RFR: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format [v2]
Naoto Sato
naoto at openjdk.org
Mon Oct 16 20:39:26 UTC 2023
On Mon, 9 Oct 2023 23:21:57 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:
>
> No longer localize printed numbers
src/java.base/share/classes/java/util/Formatter.java line 4492:
> 4490: }
> 4491: case DateTime.ISO_STANDARD_DATE: { // 'F' (%Y-%m-%d)
> 4492: // ISO_STANDAR_DTE does not need to deal with Locale
typo
test/jdk/java/util/Formatter/BasicDateTime.java line 473:
> 471: Locale.forLanguageTag("th-TH-u-nu-thai"));
> 472: test("%tF", "2023-01-13", LocalDate.of(2023, 1, 13));
> 473: Locale.setDefault(locale);
This is an incompatible change. If you intend to change the behavior, this should be approved in the CSR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1361238189
PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1361238558
More information about the core-libs-dev
mailing list