Here's the test code:
```java
DateTimeFormatter shortFormat =
new DateTimeFormatterBuilder()
.appendPattern("GG")
.toFormatter(Locale.ROOT);
DateTimeFormatter longFormat =
new DateTimeFormatterBuilder()
.appendPattern("GGGG")
.toFormatter(Locale.ROOT);
System.out.println("short era: " + shortFormat.format(IsoEra.BCE));
System.out.println(" long era: " + longFormat.format(IsoEra.BCE));
```
Java 21 (the result is the same for all Java versions below 21):
short era: BC
long era: BCE
Java 22.ea.25-open:
short era: BCE
long era: BCE
The issue was discovered as I added Java 22 to the CI matrix in pgjdbc: https://github.com/pgjdbc/pgjdbc/pull/3026
```java
DateTimeFormatter shortFormat =
new DateTimeFormatterBuilder()
.appendPattern("GG")
.toFormatter(Locale.ROOT);
DateTimeFormatter longFormat =
new DateTimeFormatterBuilder()
.appendPattern("GGGG")
.toFormatter(Locale.ROOT);
System.out.println("short era: " + shortFormat.format(IsoEra.BCE));
System.out.println(" long era: " + longFormat.format(IsoEra.BCE));
```
Java 21 (the result is the same for all Java versions below 21):
short era: BC
long era: BCE
Java 22.ea.25-open:
short era: BCE
long era: BCE
The issue was discovered as I added Java 22 to the CI matrix in pgjdbc: https://github.com/pgjdbc/pgjdbc/pull/3026
- duplicates
-
JDK-8320431 LocalDateTime.parse("4714-11-24 00:00:00 BC") fails after CLDR 44.0 update
-
- Closed
-
- relates to
-
JDK-8306116 Update CLDR to Version 44.0
-
- Resolved
-