<i18n dev> RFR: 8247781: Day periods support [v7]
Naoto Sato
naoto at openjdk.java.net
Fri Nov 6 21:12:11 UTC 2020
On Fri, 6 Nov 2020 09:12:38 GMT, Stephen Colebourne <scolebourne at openjdk.org> wrote:
>> Did you mean in STRICT mode, HOUR_OF_AMPM should default to 0, and to 6 in SMART/LENIENT modes?
>
> No. I mean that when resolving AMPM/dayPeriod in strict mode, and there is no HOUR_OF_DAY or HOUR_OF_AMPM, then do not resolve using "half way between"(ie. fail). This will produce a result where `LocalTime` cannot be obtained.
>
> var f = DateTimeFormatter.ofPattern("B").withResolverStyle(ResolverStyle.STRICT);
> var t = LocalTime.from("at night", f);
> would throw an exception in STRICT mode (whereas SMART or LENIENT would return a `LocalTime`). Same with pattern "a".
Changed to throw an exception in STRICT mode.
-------------
PR: https://git.openjdk.java.net/jdk/pull/938
More information about the i18n-dev
mailing list