You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current system locale is non-english, then date handling is broken. The regex is tuned for english days and months, but uses the calendar module to do actual lookups, meaning that things will go wonky pretty fast if anyone uses this library with a non en_US or similar locale.
In the spirit of being explicit and avoiding ambiguity, my current thinking is:
Find a way to let the user to pass in some locale info into the DateFormat init.
Use that to build a regex that matches the locale-specific days and months
Make the DateFormatPart classes honour the passed-in locale info.
Right now, the regex is a class variable, so some tweaks will have to happen to allow this to work, but shouldn't be too hard.
I'm investigating how to do runtime locale info querying without mutating global state, and will update once that is complete
The text was updated successfully, but these errors were encountered:
If the current system locale is non-english, then date handling is broken. The regex is tuned for english days and months, but uses the
calendar
module to do actual lookups, meaning that things will go wonky pretty fast if anyone uses this library with a non en_US or similar locale.In the spirit of being explicit and avoiding ambiguity, my current thinking is:
Right now, the regex is a class variable, so some tweaks will have to happen to allow this to work, but shouldn't be too hard.
I'm investigating how to do runtime locale info querying without mutating global state, and will update once that is complete
The text was updated successfully, but these errors were encountered: