-
Notifications
You must be signed in to change notification settings - Fork 106
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
Texts with date containing day name and exact date parsed incorrectly: #151
Comments
The issue with this is that "Tuesday" and "Dec 22nd" are both valid dates so the parser will always return a date that satisfies all of the date expressions found. I do like the idea of checking to see if any modifiers are present but we then still have the "which date wins" choice to make :/ |
Well, right now it doesn't satisfy any of them. Feels like there are levels of accuracy for a date - and it seems like a specific formatted date is better everything else. When talking about far-away dates like "Thursday March 17th" - someone might accidentally write the wrong day of week next to it. Or we can change the reference date used to calculate the day offset for Thursday, so it will add 0 days since this is a correct combination of day and date. Thanks! |
@eyal-meekan thanks for working thru this, if you come up with a flow that solves this issue for you then please do submit a PR - we can always add/change the code and then document why. thanks! |
I believe this is a dupe of #165 and can be closed out now. |
In this case, "Tuesday" is parsed correctly, "Dec 22nd" is parsed correctly. "Tuesday, dec 22nd" is parsed as the 28th - It finds the "December 22nd" first, than adds the number of days between now and tuesday (6)
Perhaps when there aren't qualifiers like
tuesday after dec 22nd
, it should satisfy with using the date it found.The text was updated successfully, but these errors were encountered: