[threeten-dev] Clarification request: DateTimeFormatter.ofLocalizedDate/Time behavior
Masayoshi Okutsu
masayoshi.okutsu at oracle.com
Sun Feb 3 22:05:53 PST 2013
What's the expected behavior of the following code?
DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);
System.out.println(dtf.format(JapaneseChronology.INSTANCE.dateNow()));
Currently, the format pattern is taken from a DateFormat instance if
it's actually a SimpleDateFormat. The DateFormat.get*Instance behavior
is affected by the specified Locale for selecting the calendar system to
use. For example, if the default Locale is "ja-JP-u-ca-japanese", the
format pattern from a SimpleDateFormat is for the Japanese calendar
system. But that doesn't seem to be the intended behavior (relying on
the locale's calendar).
Thanks,
Masayoshi
More information about the threeten-dev
mailing list