On Tue, 3 Oct 2023 21:37:46 GMT, 温绍锦 <d...@openjdk.org> wrote: > j.u.Formatter now prints "%tF" (iso standard date) and the result is > incorrect when processing year < 0 or year > 9999
When String.format handles "%tF" Specifier, it uses the same behavior as DateTimeFormatter. This will cause the value of printed year to be incompatible with the previous behavior. The year value range [-∞, -1000] changes: // String.format("%tF", LocalDate.of(-10000, 1, 1)) before 10001-01-01 after -99999-01-01 The year value range [-9999, -1] changes: // String.format("%tF", LocalDate.of(-1, 1, 1)) before 0002-01-01 after -0001-01-01 The year value range [-∞, -1000] changes: //String.format("%tF", LocalDate.of(10000, 1, 1)): before 10000-01-01 after +10000-01-01 ------------- PR Comment: https://git.openjdk.org/jdk/pull/16033#issuecomment-1753981207