<i18n dev> RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8]
Naoto Sato
naoto at openjdk.org
Fri Nov 17 23:38:35 UTC 2023
On Fri, 17 Nov 2023 22:58:00 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> src/java.base/share/classes/java/util/Formatter.java line 4507:
>>
>>> 4505: || t instanceof LocalDateTime
>>> 4506: || t instanceof LocalDate) {
>>> 4507: yearField = ChronoField.YEAR;
>>
>> This enumeration of type doesn't seem very principled and may not be correct for an arbitrary Temporal.
>> (But so far, I don't have a better suggestion).
>
> Haven't tried, but I think `t.getChronology() instanceof IsoChronology` should work
Now I tried and it didn't compile 🙂 It should have been `t.query(TemporalQueries.chronology()) instanceof IsoChronology`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1397992697
More information about the i18n-dev
mailing list