-
Notifications
You must be signed in to change notification settings - Fork 340
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
Simple date in spanish not working: "Agosto 23" #201
Comments
I don't speak Spanish, but look like Spanish date format is "little-endian". It should be "23 Agosto", not "August 23" like US English. I guess that why @gimenete, the contributor, didn't add the middle-endian parser for Spanish. |
That's right. In Spanish you say "23 Agosto", but never "Agosto 23" |
I beg to differ. There are a lot of circumstances where this date pattern Is useful. Even if it is true that the date first/month second is more common I do not see any downside in chrono recognizing it. |
The idea is to avoid false positives such as "He trabajado en agosto 23 días" (I've worked in August for 23 days) |
@gimenete this is hitting us on a production software. If a user responds "Agosto 23" without any other words around, I do not think there are any false positives. Maybe we can have a |
@acrodrig I like the idea of an |
Doesn't Chrono already have a strict mode (instead of casual config). Might be mistaken, but I think we have something like it. |
@acrodrig For your use case, you can create the middle-endian as a custom parser for ES (see. how the little-endian parser work). However, it would be nicer if you can implement the parser behind |
Thanks @wanasit. I will do that. |
The following program:
Outputs:
The second (english date) was parsed correctly, but the exact translation does not work.
Can you help?
The text was updated successfully, but these errors were encountered: