-
Notifications
You must be signed in to change notification settings - Fork 47
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
Parse a date with given locale #30
Comments
The Java I'll close the issue unless you're willing to contribute design ideas/implementation. |
Ideas? Sure! Maybe just add another key to |
That's an OK idea. However, I don't like its ad-hoc-ness. There are various ; modify locale and zone - have to revert to Java interop. Arrrgh!
(-> (formatter "MMM d yyyy" {:locale "en"}) (.withZone my-tz)) My thinking is - the Clojure API should cover a certain set of functionality in a consistent way, e.g. all |
I opt for configuration map. I would implement two additional options: locale and time-zone.
|
This makes sense. The DateTimeFormatter JavaDoc mentions the following options:
I'd implement them all with sensible conversion defaults as you described for the |
I want to parse a date for given string
"Jan 1 2010"
. Since my locale is PL,(dt/local-date "MMM d yyyy" "Jan 1 2010")
doesn't work. What works is:(dt/local-date "MMM d yyyy" "sty 1 2010")
Is there any way to add locale for formatter?
This code works for me:
The text was updated successfully, but these errors were encountered: