Skip to content

Commit

Permalink
format Time string in 24 hours format
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMeGet committed Oct 18, 2016
1 parent b6d4d53 commit e61506b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/model/person/Time.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Time(List<java.util.Date> dateList) throws IllegalValueException {
String [] timeStrings = new String [2];
for (int i = 0; i < dateList.size(); i++){
java.util.Date date = dateList.get(i);
timeStrings[i] = date.getDate() + "." + (date.getMonth() + 1) + "." + (date.getYear() + 1900);
timeStrings[i] = String.format("%d%02d", date.getHours(), date.getMinutes());

if (!isValidTime(timeStrings[i])) {
throw new IllegalValueException(MESSAGE_TIME_CONSTRAINTS);
Expand Down

0 comments on commit e61506b

Please sign in to comment.