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

Can't detect year when spelled out #212

Open
brenthale opened this issue Mar 24, 2017 · 0 comments
Open

Can't detect year when spelled out #212

brenthale opened this issue Mar 24, 2017 · 0 comments

Comments

@brenthale
Copy link

brenthale commented Mar 24, 2017

Here is the String I entered into the 'Try it out' page:

"eleventh Day of May one thousand eight hundred"

This does parse it and finds Thu May 11 19:07:01 UTC 2017. But notice that the year is wrong. I would expect it to be 1800.

Another example:

"eighteenth day of January in the year of our Lord one thousand eight hundred and seventeen"

parses to be Wed Jan 18 19:08:39 UTC 2017. Again, notice the wrong year.

Given this statement on your docs page:

"with the reasoning that people don't typically reference dates that are centuries away from the present."

I have an application that will look for dates from the 1400's to 1900's. Is there a way to cause the parse to defer to years rather than 'time of day' interpretations. I won't have any time of day information in my text.

Additionally, this library should probably be refactored to return java.time.LocalDateTime instead of Date.

This looks promising.
Thanks for providing it.
Brent

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

No branches or pull requests

1 participant