Skip to content

Conversation

@dhirajbhandari
Copy link

Parse four-digits as Year (YYYY) not time (HHmm)
For eg: treats '2014' as Year 2014 rather than Military Time 20:14

  • changed DateParser.g to recognize 'formal_year_four_digits' (without the month component) as formal_date
  • changed DateWalker.g to create 'explicit_year_only_date' from the above and made an alternative for date rule

larrys and others added 30 commits January 4, 2011 16:09
…n larger strings. Necessary tree walking changes are on the way
… day of 2009', 'first to last day of 2 septembers from now'
joestelmach and others added 27 commits October 20, 2012 12:14
… a dangling known token at the end of the stream. fixes joestelmach#40
In general, tokens that are substrings should be ignored.
Known issues: afri, zfri, afriday, zfriday are still parsed for the following reasons:
- 'afri' or 'afriday' are lexed as FRIDAY, with AM dissapearing somewhere
- 'zfri' or 'zfriday' are lexed as UTC FRIDAY and are then parsed into a valid date
Conflicts:
	src/test/java/com/joestelmach/natty/DateTimeTest.java
  Eg, (common usage):  2014  should mean Year 2014 rather than Military Time 20:14
  - changed DateParser.g to recognize  'formal_year_four_digits' (without the month component) as formal_date
  - changed DateWalker.g to create 'explicit_year_only_date' from the above and made an alternative for date rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants