<i18n dev> RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v8]

Roger Riggs rriggs at openjdk.org
Fri Nov 17 22:19:38 UTC 2023


On Fri, 10 Nov 2023 03:31:26 GMT, Shaojin Wen <duke at openjdk.org> wrote:

>> j.u.Formatter now prints "%tF" (iso standard date) and the result is incorrect when processing year < 0 or year > 9999
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix format 'ja-JP-u-ca-japanese' ChronoLocalDate

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).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1397946102


More information about the i18n-dev mailing list