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
Improve input tolerance to understand all languages. #122
Comments
But
properly gives "ä" |
With what did you test? |
Sorry, März is working. The point is, that I render it in Germany, so it becomes "Mär" in my case, which does not work afterwards. |
I would say yes but if you find a good way to get that from the moment lib, why not. It is included anyway and input tolerance does not need to be optimized for performance. |
Sure, I meant more a solution which supports all months and weekdays which the moment lib supports. To be done later. |
Yes .. my code would support that, if you want to reuse it.. |
Sorry, I was in a hurry. I meant to support all months and weekdays in all languages which the moment lib supports. So ideally there would be a way to iterate over all support languages of the lib. |
But there will be probably collisions over the different languages. Is that
|
That is likely. Will need to be checked and tested. Concerning the data structure it would be no real problem as the first match is used. |
For my use case it would also be sufficient to specify only one language to
|
Thanks. works well. #chat: Did I mention I hate NPM? |
Good to know. #chat: You did. I like npm though. |
Are there any updates on this? I'm currently facing the same problem - opening_hours does not understand it's own output for month "März", because moment.js uses "Mrz." which does not match the regex used in opening_hours.js ("März?") in its localization file. |
Not yet but the initial design has already been done and implemented: https://github.com/opening-hours/opening_hours.js/blob/master/gen_word_error_correction.js |
Example:
2015 Mär 10 10:00-20:00
2015 März 10 10:00-20:00
on
http://ypid.de/~osm/evaluation_tool/
Gives:
2015 Mä <--- (Unexpected token: "m" This means that the syntax is not valid at that point or it is currently not supported.)
The text was updated successfully, but these errors were encountered: