ocpsoft / prettytime

Social Style Date and Time Formatting for Java
http://ocpsoft.org/prettytime/
Apache License 2.0
1.29k stars 253 forks source link

error in parsing the date format MM/yyyy #196

Closed rssdev10 closed 3 years ago

rssdev10 commented 3 years ago

Dates in a format MM/yyyy like 01/2001, 01/2017, etc, are parsed as dates with two digits year only.

new PrettyTimeParser().parseSyntax("01/2001")

gives:

dates -> Mon Jan 20 19:04:22 UTC 2020
text = 01/20

Any 20xx year gives 20 only.

Library version: 'org.ocpsoft.prettytime:prettytime-nlp:4.0.5.Final'

lincolnthree commented 3 years ago

Issues with NLP should be reported to: https://github.com/joestelmach/natty

NOTE: This may be fixed in PrettyTime 5.0.0, as we've updated to Natty 0.13.0.

Issue cleanup Thanks for filing this issue. We are cleaning old issues from the repository. If the issue is still reproducible, please re-open with a test case to reproduce the behavior.