Skip to content

Commit

Permalink
Update docs + fix date parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 13, 2020
1 parent db21959 commit ab028a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

Examples
```
done 1
do 1
done,1
do,1
```

##### Delete a task
Expand All @@ -37,7 +37,7 @@ do 1
Examples
```
delete,1
del 1
del,1
```

### Creating tasks
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/duke/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static Integer parseInt(String str) {
*/
public static Date parseDate(String dateStr)
throws ParseException {
SimpleDateFormat format = new SimpleDateFormat("dd-MM-YYYY");
SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");
Date date = format.parse(dateStr);
return date;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/ParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void parseDate() {
long actual = Parser
.parseDate("12-04-1998")
.getTime();
long expected = 883238400000L;
long expected = 892310400000L;
assertEquals(actual, expected);
} catch (Exception e) {
fail();
Expand Down

0 comments on commit ab028a3

Please sign in to comment.