Skip to content

Commit

Permalink
allow extra whitespace in date time separator. fixes joestelmach#141
Browse files Browse the repository at this point in the history
  • Loading branch information
joestelmach committed Sep 28, 2015
1 parent 5238db1 commit a146a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ date_time

date_time_separator
: WHITE_SPACE (AT WHITE_SPACE)?
| COMMA WHITE_SPACE? (AT WHITE_SPACE)?
| WHITE_SPACE? COMMA WHITE_SPACE? (AT WHITE_SPACE)?
| T
;

Expand Down
1 change: 1 addition & 0 deletions src/test/java/com/joestelmach/natty/DateTimeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void testSpecific() throws Exception {
validateDateTime("April 20 10", 4, 20, 2012, 10, 0, 0);
validateDateTime("April 20 at 10 am", 4, 20, 2012, 10, 0, 0);
validateDateTime("Mar 16, 2015 3:33:39 PM", 3, 16, 2015, 15, 33, 39);
validateDateTime("15-Sep-2015 , 10:00 AM", 9, 15, 2015, 10, 00, 00);
}

@Test
Expand Down

0 comments on commit a146a38

Please sign in to comment.