Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raj/4 digits as year #88

Open
wants to merge 104 commits into
base: master
Choose a base branch
from

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