-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels