-
Bug
-
Resolution: Fixed
-
P3
-
9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174669 | 10 | Naoto Sato | P3 | Resolved | Fixed | b01 |
JDK-8183845 | 8u161 | Naoto Sato | P3 | Resolved | Fixed | b01 |
JDK-8178388 | 8u152 | Naoto Sato | P3 | Resolved | Fixed | b03 |
JDK-8192579 | emb-8u161 | Naoto Sato | P3 | Resolved | Fixed | b01 |
If a supplemental new era is specified with the system property "jdk.calendar.japanese.supplemental.era", the display name is incorrect in the formatted string. The following code snippet demonstrates the issue (" -Djdk.calendar.japanese.supplemental.era="name=NewEra,abbr=N.E.,since=1546300800000"" is given on invocation):
--
LocalDate ldHeisei = LocalDate.of(2018, Month.JANUARY, 1);
LocalDate ldNewEra = LocalDate.of(2019, Month.JANUARY, 1); // first day of NewEra
DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
.withChronology(JapaneseChronology.INSTANCE)
.withZone(ZoneId.systemDefault());
System.out.println(dtf.format(ldHeisei));
System.out.println(dtf.format(ldNewEra));
--
The output is:
--
Monday, January 1, 30 Heisei
Tuesday, January 1, 1 3
--
The last "3" should display as "NewEra."
--
LocalDate ldHeisei = LocalDate.of(2018, Month.JANUARY, 1);
LocalDate ldNewEra = LocalDate.of(2019, Month.JANUARY, 1); // first day of NewEra
DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
.withChronology(JapaneseChronology.INSTANCE)
.withZone(ZoneId.systemDefault());
System.out.println(dtf.format(ldHeisei));
System.out.println(dtf.format(ldNewEra));
--
The output is:
--
Monday, January 1, 30 Heisei
Tuesday, January 1, 1 3
--
The last "3" should display as "NewEra."
- backported by
-
JDK-8174669 Wrong display name for supplemental Japanese era
-
- Resolved
-
-
JDK-8178388 Wrong display name for supplemental Japanese era
-
- Resolved
-
-
JDK-8183845 Wrong display name for supplemental Japanese era
-
- Resolved
-
-
JDK-8192579 Wrong display name for supplemental Japanese era
-
- Resolved
-
- relates to
-
JDK-8054214 JapaneseEra.getDisplayName doesn't return names if it's an additional era
-
- Closed
-
-
JDK-8177776 Create an equivalent test case for JDK9's SupplementalJapaneseEraTest
-
- Resolved
-
(1 relates to)