--- old/make/data/cldr/common/main/ja.xml 2019-03-31 20:57:25.932991340 -0700 +++ new/make/data/cldr/common/main/ja.xml 2019-03-31 20:57:24.752969009 -0700 @@ -3633,7 +3633,7 @@ 大正 昭和 平成 - 元号 + 令和 大化 @@ -3872,7 +3872,7 @@ T S H - N + R --- old/make/data/cldr/common/main/root.xml 2019-03-31 20:57:35.630174859 -0700 +++ new/make/data/cldr/common/main/root.xml 2019-03-31 20:57:34.380151201 -0700 @@ -2030,7 +2030,7 @@ Taishō Shōwa Heisei - NewEra + Reiwa Taika (645–650) @@ -2269,7 +2269,7 @@ T S H - N + R --- old/make/data/unicodedata/UnicodeData.txt 2019-03-31 20:57:44.130335740 -0700 +++ new/make/data/unicodedata/UnicodeData.txt 2019-03-31 20:57:42.938313178 -0700 @@ -11836,7 +11836,7 @@ 32FC;CIRCLED KATAKANA WI;So;0;L; 30F0;;;;N;;;;; 32FD;CIRCLED KATAKANA WE;So;0;L; 30F1;;;;N;;;;; 32FE;CIRCLED KATAKANA WO;So;0;L; 30F2;;;;N;;;;; -32FF;SQUARE ERA NAME NEWERA;So;0;L; 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;; +32FF;SQUARE ERA NAME REIWA;So;0;L; 4EE4 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME REIWA;;;; 3300;SQUARE APAATO;So;0;L; 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;; 3301;SQUARE ARUHUA;So;0;L; 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;; 3302;SQUARE ANPEA;So;0;L; 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;; --- old/src/java.base/share/classes/java/time/chrono/JapaneseEra.java 2019-03-31 20:57:54.342529043 -0700 +++ new/src/java.base/share/classes/java/time/chrono/JapaneseEra.java 2019-03-31 20:57:53.220507804 -0700 @@ -151,14 +151,14 @@ */ public static final JapaneseEra HEISEI = new JapaneseEra(2, LocalDate.of(1989, 1, 8)); /** - * The singleton instance for the 'NewEra' era (2019-05-01 - current) + * The singleton instance for the 'Reiwa' era (2019-05-01 - ) * which has the value 3. */ - private static final JapaneseEra NEWERA = new JapaneseEra(3, LocalDate.of(2019, 5, 1)); + private static final JapaneseEra REIWA = new JapaneseEra(3, LocalDate.of(2019, 5, 1)); // The number of predefined JapaneseEra constants. // There may be a supplemental era defined by the property. - private static final int N_ERA_CONSTANTS = NEWERA.getValue() + ERA_OFFSET; + private static final int N_ERA_CONSTANTS = REIWA.getValue() + ERA_OFFSET; /** * Serialization version. @@ -176,7 +176,7 @@ KNOWN_ERAS[1] = TAISHO; KNOWN_ERAS[2] = SHOWA; KNOWN_ERAS[3] = HEISEI; - KNOWN_ERAS[4] = NEWERA; + KNOWN_ERAS[4] = REIWA; for (int i = N_ERA_CONSTANTS; i < ERA_CONFIG.length; i++) { CalendarDate date = ERA_CONFIG[i].getSinceDate(); LocalDate isoDate = LocalDate.of(date.getYear(), date.getMonth(), date.getDayOfMonth()); --- old/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java 2019-03-31 20:58:02.068675302 -0700 +++ new/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java 2019-03-31 20:58:00.974654591 -0700 @@ -50,7 +50,7 @@ * 2 Taisho 1912-07-30T00:00:00 local time * 3 Showa 1926-12-25T00:00:00 local time * 4 Heisei 1989-01-08T00:00:00 local time - * 5 NewEra 2019-05-01T00:00:00 local time + * 5 Reiwa 2019-05-01T00:00:00 local time * ------------------------------------------------------ * } * @@ -129,9 +129,9 @@ public static final int HEISEI = 4; /** - * The ERA constant designating the NewEra era. + * The ERA constant designating the Reiwa era. */ - private static final int NEWERA = 5; + private static final int REIWA = 5; private static final int EPOCH_OFFSET = 719163; // Fixed date of January 1, 1970 (Gregorian) @@ -1761,12 +1761,12 @@ } } else if (transitionYear) { if (jdate.getYear() == 1) { - // As of NewEra (since Meiji) there's no case + // As of Reiwa (since Meiji) there's no case // that there are multiple transitions in a // year. Historically there was such // case. There might be such case again in the // future. - if (era > NEWERA) { + if (era > REIWA) { CalendarDate pd = eras[era - 1].getSinceDate(); if (normalizedYear == pd.getYear()) { d.setMonth(pd.getMonth()).setDayOfMonth(pd.getDayOfMonth()); --- old/src/java.base/share/classes/sun/text/resources/FormatData.java 2019-03-31 20:58:10.399833028 -0700 +++ new/src/java.base/share/classes/sun/text/resources/FormatData.java 2019-03-31 20:58:09.342813015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -106,7 +106,7 @@ "T", "S", "H", - "N", // NewEra + "R", }; // Japanese imperial calendar era strings @@ -116,7 +116,7 @@ "Taisho", "Showa", "Heisei", - "NewEra", // NewEra + "Reiwa", }; return new Object[][] { --- old/src/java.base/share/classes/sun/text/resources/JavaTimeSupplementary.java 2019-03-31 20:58:17.974976452 -0700 +++ new/src/java.base/share/classes/sun/text/resources/JavaTimeSupplementary.java 2019-03-31 20:58:16.850955170 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -159,7 +159,7 @@ "Taisho", "Showa", "Heisei", - "NewEra", // New Era + "Reiwa", }; final String[] sharedShortEras = { --- old/src/java.base/share/classes/sun/util/calendar/Era.java 2019-03-31 20:58:26.038129129 -0700 +++ new/src/java.base/share/classes/sun/util/calendar/Era.java 2019-03-31 20:58:24.915107863 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,7 +48,7 @@ * Taisho 1912-07-30T00:00:00 local time * Showa 1926-12-25T00:00:00 local time * Heisei 1989-01-08T00:00:00 local time - * NewEra 2019-05-01T00:00:00 local time + * Reiwa 2019-05-01T00:00:00 local time * ----------------------------------------------------------------------- * } * --- old/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java 2019-03-31 20:58:34.648292176 -0700 +++ new/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java 2019-03-31 20:58:33.539271175 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ new Era("Taisho", "T", -1812153600000L, true), new Era("Showa", "S", -1357603200000L, true), new Era("Heisei", "H", 600220800000L, true), - new Era("NewEra", "N", 1556668800000L, true), + new Era("Reiwa", "R", 1556668800000L, true), }; private static boolean isValidEra(Era newEra, Era[] eras) { --- old/src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java 2019-03-31 20:58:44.128471717 -0700 +++ new/src/java.base/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java 2019-03-31 20:58:42.956449519 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -84,10 +84,10 @@ Era[] jeras = CalendarSystem.forName("japanese").getEras(); if (value <= jeras.length) { // Localized era name could not be retrieved from this provider. - // This can occur either for NewEra or SupEra. + // This can occur either for Reiwa or SupEra. // // If it's CLDR provider, try COMPAT first, which is guaranteed to have - // the name for NewEra. + // the name for Reiwa. if (type == LocaleProviderAdapter.Type.CLDR) { lr = LocaleProviderAdapter.forJRE().getLocaleResources(locale); key = getResourceKeyFor(LocaleProviderAdapter.Type.JRE, --- old/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_ja.java 2019-03-31 20:58:53.094641538 -0700 +++ new/src/jdk.localedata/share/classes/sun/text/resources/ext/FormatData_ja.java 2019-03-31 20:58:51.796616952 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,7 +91,7 @@ "\u5927\u6b63", // Taisho "\u662d\u548c", // Showa "\u5e73\u6210", // Heisei - "\u5143\u53f7", // NewEra + "\u4ee4\u548c", // Reiwa }; final String[] rocEras = { "\u6c11\u56fd\u524d", --- old/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ja.java 2019-03-31 20:59:02.216814330 -0700 +++ new/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ja.java 2019-03-31 20:59:00.883789079 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -154,7 +154,7 @@ "\u5927\u6b63", "\u662d\u548c", "\u5e73\u6210", - "\u5143\u53f7", // NewEra + "\u4ee4\u548c", }; final String[] sharedJavaTimeShortEras = { --- old/test/jdk/java/lang/Character/UnicodeData.txt 2019-03-31 20:59:10.977980300 -0700 +++ new/test/jdk/java/lang/Character/UnicodeData.txt 2019-03-31 20:59:09.760957244 -0700 @@ -11836,7 +11836,7 @@ 32FC;CIRCLED KATAKANA WI;So;0;L; 30F0;;;;N;;;;; 32FD;CIRCLED KATAKANA WE;So;0;L; 30F1;;;;N;;;;; 32FE;CIRCLED KATAKANA WO;So;0;L; 30F2;;;;N;;;;; -32FF;SQUARE ERA NAME NEWERA;So;0;L; 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;; +32FF;SQUARE ERA NAME REIWA;So;0;L; 4EE4 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME REIWA;;;; 3300;SQUARE APAATO;So;0;L; 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;; 3301;SQUARE ARUHUA;So;0;L; 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;; 3302;SQUARE ANPEA;So;0;L; 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;; --- old/test/jdk/java/text/Format/DateFormat/WeekDateTest.java 2019-03-31 20:59:22.625200964 -0700 +++ new/test/jdk/java/text/Format/DateFormat/WeekDateTest.java 2019-03-31 20:59:21.528180179 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,9 +137,9 @@ Calendar jcal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), new Locale("ja", "JP", "JP")); - String format = "2-W01-2"; // 2019-12-31 == N1-12-31 + String format = "2-W01-2"; // 2019-12-31 == R1-12-31 int expectedYear = 2019; - // Check the current era, Heisei or NewEra + // Check the current era, Heisei or Reiwa if (System.currentTimeMillis() < 1556668800000L) { format = "21-W01-3"; // 2008-12-31 == H20-12-31 expectedYear = 2008; --- old/test/jdk/java/time/tck/java/time/chrono/TCKJapaneseChronology.java 2019-03-31 20:59:30.955358801 -0700 +++ new/test/jdk/java/time/tck/java/time/chrono/TCKJapaneseChronology.java 2019-03-31 20:59:29.948339720 -0700 @@ -1,5 +1,5 @@ /* - o Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + o Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -111,7 +111,9 @@ */ @Test public class TCKJapaneseChronology { - private static final int YDIFF_NEWERA = 2018; + + // Year differences from Gregorian years. + private static final int YDIFF_REIWA = 2018; private static final int YDIFF_HEISEI = 1988; private static final int YDIFF_MEIJI = 1867; private static final int YDIFF_SHOWA = 1925; @@ -174,7 +176,7 @@ @DataProvider(name="createByEra") Object[][] data_createByEra() { return new Object[][] { - {JapaneseEra.of(3), 2020 - YDIFF_NEWERA, 2, 29, 60, LocalDate.of(2020, 2, 29)}, // NEWERA + {JapaneseEra.of(3), 2020 - YDIFF_REIWA, 2, 29, 60, LocalDate.of(2020, 2, 29)}, {JapaneseEra.HEISEI, 1996 - YDIFF_HEISEI, 2, 29, 60, LocalDate.of(1996, 2, 29)}, {JapaneseEra.HEISEI, 2000 - YDIFF_HEISEI, 2, 29, 60, LocalDate.of(2000, 2, 29)}, {JapaneseEra.MEIJI, 1874 - YDIFF_MEIJI, 2, 28, 59, LocalDate.of(1874, 2, 28)}, @@ -367,8 +369,8 @@ @DataProvider(name="prolepticYear") Object[][] data_prolepticYear() { return new Object[][] { - {3, JapaneseEra.of(3), 1, 1 + YDIFF_NEWERA, false}, // NEWERA - {3, JapaneseEra.of(3), 102, 102 + YDIFF_NEWERA, true}, // NEWERA + {3, JapaneseEra.of(3), 1, 1 + YDIFF_REIWA, false}, + {3, JapaneseEra.of(3), 102, 102 + YDIFF_REIWA, true}, {2, JapaneseEra.HEISEI, 1, 1 + YDIFF_HEISEI, false}, {2, JapaneseEra.HEISEI, 4, 4 + YDIFF_HEISEI, true}, @@ -553,7 +555,7 @@ { JapaneseEra.TAISHO, 0, "Taisho"}, { JapaneseEra.SHOWA, 1, "Showa"}, { JapaneseEra.HEISEI, 2, "Heisei"}, - { JapaneseEra.of(3), 3, "NewEra"}, // NEWERA + { JapaneseEra.of(3), 3, "Reiwa"}, }; } @@ -689,7 +691,7 @@ {JapaneseChronology.INSTANCE.date(1989, 1, 7), "Japanese Showa 64-01-07"}, {JapaneseChronology.INSTANCE.date(1989, 1, 8), "Japanese Heisei 1-01-08"}, {JapaneseChronology.INSTANCE.date(2012, 12, 6), "Japanese Heisei 24-12-06"}, - {JapaneseChronology.INSTANCE.date(2020, 1, 6), "Japanese NewEra 2-01-06"}, + {JapaneseChronology.INSTANCE.date(2020, 1, 6), "Japanese Reiwa 2-01-06"}, }; } --- old/test/jdk/java/time/tck/java/time/chrono/TCKJapaneseEra.java 2019-03-31 20:59:38.128494726 -0700 +++ new/test/jdk/java/time/tck/java/time/chrono/TCKJapaneseEra.java 2019-03-31 20:59:37.086474980 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -79,7 +79,7 @@ @DataProvider(name = "JapaneseEras") Object[][] data_of_eras() { return new Object[][] { - {JapaneseEra.of(3), "NewEra", 3}, // NEWERA + {JapaneseEra.of(3), "Reiwa", 3}, {JapaneseEra.HEISEI, "Heisei", 2}, {JapaneseEra.SHOWA, "Showa", 1}, {JapaneseEra.TAISHO, "Taisho", 0}, --- old/test/jdk/java/time/test/java/time/chrono/TestJapaneseChronology.java 2019-03-31 20:59:45.050625903 -0700 +++ new/test/jdk/java/time/test/java/time/chrono/TestJapaneseChronology.java 2019-03-31 20:59:44.138608620 -0700 @@ -34,6 +34,7 @@ import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; /** * Tests for the Japanese chronology @@ -59,7 +60,7 @@ { JapaneseEra.SHOWA, 64, 1, 7, 1989 }, { JapaneseEra.HEISEI, 1, 1, 8, 1989 }, { JapaneseEra.HEISEI, 31, 4, 30, 2019 }, - { JapaneseEra.of(3), 1, 5, 1, 2019 }, // NEWERA + { JapaneseEra.of(3), 1, 5, 1, 2019 }, }; } @@ -77,7 +78,7 @@ { JapaneseEra.HEISEI, 1, 1, 1, 8 }, { JapaneseEra.HEISEI, 2, 8, 1, 8 }, { JapaneseEra.HEISEI, 31, 120, 4, 30 }, - { JapaneseEra.of(3), 1, 1, 5, 1 }, // NEWERA + { JapaneseEra.of(3), 1, 1, 5, 1 }, }; } @@ -110,8 +111,8 @@ { JapaneseEra.HEISEI, 1, 1, 7 }, { JapaneseEra.HEISEI, 1, 2, 29 }, { JapaneseEra.HEISEI, 31, 5, 1 }, - { JapaneseEra.of(3), 1, 4, 30 }, // NEWERA - { JapaneseEra.of(3), Year.MAX_VALUE, 12, 31 }, // NEWERA + { JapaneseEra.of(3), 1, 4, 30 }, + { JapaneseEra.of(3), Year.MAX_VALUE, 12, 31 }, }; } @@ -131,9 +132,9 @@ { JapaneseEra.HEISEI, -1 }, { JapaneseEra.HEISEI, 0 }, { JapaneseEra.HEISEI, 32 }, - { JapaneseEra.of(3), -1 }, // NEWERA - { JapaneseEra.of(3), 0 }, // NEWERA - { JapaneseEra.of(3), Year.MAX_VALUE }, // NEWERA + { JapaneseEra.of(3), -1 }, + { JapaneseEra.of(3), 0 }, + { JapaneseEra.of(3), Year.MAX_VALUE }, }; } @@ -151,8 +152,21 @@ { JapaneseEra.HEISEI, 1, 360 }, { JapaneseEra.HEISEI, 2, 366 }, { JapaneseEra.HEISEI, 31, 121 }, - { JapaneseEra.of(3), 1, 246 }, // NEWERA - { JapaneseEra.of(3), 2, 367 }, // NEWERA + { JapaneseEra.of(3), 1, 246 }, + { JapaneseEra.of(3), 2, 367 }, + }; + } + + @DataProvider + Object[][] eraNameData() { + return new Object[][] { + // Japanese era, name, exception + { "Meiji", JapaneseEra.MEIJI, null }, + { "Taisho", JapaneseEra.TAISHO, null }, + { "Showa", JapaneseEra.SHOWA, null }, + { "Heisei", JapaneseEra.HEISEI, null }, + { "Reiwa", JapaneseEra.of(3), null }, + { "NewEra", null, IllegalArgumentException.class}, }; } @@ -204,4 +218,13 @@ JapaneseDate date = JAPANESE.dateYearDay(era, yearOfEra, dayOfYear); System.out.printf("No DateTimeException with era=%s, year=%d, dayOfYear=%d%n", era, yearOfEra, dayOfYear); } + + @Test(dataProvider="eraNameData") + public void test_eraName(String eraName, JapaneseEra era, Class expectedEx) { + try { + assertEquals(JapaneseEra.valueOf(eraName), era); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } } --- old/test/jdk/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java 2019-03-31 20:59:51.762753110 -0700 +++ new/test/jdk/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java 2019-03-31 20:59:50.783734555 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -776,9 +776,9 @@ {HijrahDate.of(1434,5,1), "Japanese Heisei 25-03-13"}, {HijrahDate.of(1436,1,1), "Japanese Heisei 26-10-25"}, {HijrahDate.of(1440,8,25), "Japanese Heisei 31-04-30"}, - {HijrahDate.of(1440,8,26), "Japanese NewEra 1-05-01"}, - {HijrahDate.of(1500,6,12), "Japanese NewEra 59-05-05"}, - {HijrahDate.of(1550,3,11), "Japanese NewEra 107-08-11"}, + {HijrahDate.of(1440,8,26), "Japanese Reiwa 1-05-01"}, + {HijrahDate.of(1500,6,12), "Japanese Reiwa 59-05-05"}, + {HijrahDate.of(1550,3,11), "Japanese Reiwa 107-08-11"}, }; } --- old/test/jdk/java/time/test/java/time/format/TestNonIsoFormatter.java 2019-03-31 20:59:58.292876876 -0700 +++ new/test/jdk/java/time/test/java/time/format/TestNonIsoFormatter.java 2019-03-31 20:59:57.341858851 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -143,7 +143,7 @@ // Chronology, lenient era/year, strict era/year { JAPANESE, "Meiji 123", "Heisei 2" }, { JAPANESE, "Showa 65", "Heisei 2" }, - { JAPANESE, "Heisei 32", "NewEra 2" }, // NewEra + { JAPANESE, "Heisei 32", "Reiwa 2" }, }; } --- old/test/jdk/java/util/Calendar/CalendarTestScripts/CalendarAdapter.java 2019-03-31 21:00:07.706055298 -0700 +++ new/test/jdk/java/util/Calendar/CalendarTestScripts/CalendarAdapter.java 2019-03-31 21:00:06.296028571 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -364,7 +364,7 @@ "Taisho", "Showa", "Heisei", - "NewEra" + "Reiwa" }; break; } --- old/test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java 2019-03-31 21:00:15.979212126 -0700 +++ new/test/jdk/java/util/Calendar/CalendarTestScripts/Symbol.java 2019-03-31 21:00:15.033194193 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -322,7 +322,7 @@ put("taisho", new Symbol(Type.ERA, 2)); put("showa", new Symbol(Type.ERA, 3)); put("heisei", new Symbol(Type.ERA, 4)); - put("newera", new Symbol(Type.ERA, 5)); + put("reiwa", new Symbol(Type.ERA, 5)); } } --- old/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese.cts 2019-03-31 21:00:31.435505154 -0700 +++ new/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese.cts 2019-03-31 21:00:29.974477454 -0700 @@ -57,7 +57,7 @@ check millisecond 0 clear all - set era NewEra + set era Reiwa check era Heisei check datetime 31 Jan 1 0 0 0 check millisecond 0 --- old/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese_add.cts 2019-03-31 21:00:39.410656369 -0700 +++ new/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese_add.cts 2019-03-31 21:00:38.434637862 -0700 @@ -16,10 +16,10 @@ test add ERA use jcal clear all - set date NewEra 17 Mar 8 + set date Reiwa 17 Mar 8 add era 10 - # as of NewEra 17 March 8 - check era NewEra + # as of Reiwa 17 March 8 + check era Reiwa add era -100 check era BeforeMeiji @@ -342,12 +342,12 @@ check date BeforeMeiji $minyear May 18 check timeofday 1 47 4 191 - set date NewEra 17 Jan 1 + set date Reiwa 17 Jan 1 get max year assign $result $max - set date NewEra $max Jul 17 + set date Reiwa $max Jul 17 add month 1 - check date NewEra $max Aug 17 + check date Reiwa $max Aug 17 # set date Heisei $max Jul 28 # set timeofday 23 59 59 999 # add month 1 --- old/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese_minmax.cts 2019-03-31 21:00:47.205804182 -0700 +++ new/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese_minmax.cts 2019-03-31 21:00:45.893779302 -0700 @@ -14,10 +14,10 @@ test Make sure that the maximum year value doesn't depent on era use jcal - # Note: the max year value is as of NewEra + # Note: the max year value is as of Reiwa assign 292276976 $max clear all - set date NewEra 1 May 1 + set date Reiwa 1 May 1 get millis check max year $max assign $max $maxyear @@ -39,9 +39,9 @@ test Max of ERA use jcal - # Assumption: NewEra is the current era - check maximum era NewEra - check leastmax era NewEra + # Assumption: Reiwa is the current era + check maximum era Reiwa + check leastmax era Reiwa test Actual max MONTH use jcal @@ -78,7 +78,7 @@ check actualmax month Apr clear all - set date NewEra 2 Jan 1 + set date Reiwa 2 Jan 1 set year $maxyear check actualmax month Aug get millis @@ -133,8 +133,8 @@ # time zone dependent use tokyocal clear all - set date NewEra $maxyear Jan 1 - # the last date of NewEra is N292276976.08.17T16:12:55.807+0900 + set date Reiwa $maxyear Jan 1 + # the last date of Reiwa is R292276976.08.17T16:12:55.807+0900 check actualmax day_of_year 229 # 31+28+31+30+31+30+31+17 test Actual max WEEK_OF_YEAR @@ -165,12 +165,12 @@ clear all set date Heisei 31 Apr 28 check actualmax week_of_year 17 - set date NewEra 1 Aug 9 + set date Reiwa 1 Aug 9 check actualmax week_of_year 35 use tokyocal - set date NewEra $maxyear Jan 1 - # the last date of NewEra is N292276976.08.17T16:12:55.807+0900 (Sunday) + set date Reiwa $maxyear Jan 1 + # the last date of Reiwa is R292276976.08.17T16:12:55.807+0900 (Sunday) # The year is equivalent to 2003 (Gregorian). check actualmax week_of_year 34 @@ -197,12 +197,12 @@ clear all set date Heisei 31 Apr 30 check actualmax week_of_month 5 - set date NewEra 1 May 1 + set date Reiwa 1 May 1 check actualmax week_of_month 5 use tokyocal - set date NewEra $maxyear Jan 1 - # the last date of NewEra is N292276976.08.17T16:12:55.807+0900 (Sunday) + set date Reiwa $maxyear Jan 1 + # the last date of Reiwa is R292276976.08.17T16:12:55.807+0900 (Sunday) # The year is equivalent to 2003 (Gregorian). check actualmax week_of_month 4 @@ -229,13 +229,13 @@ clear all set date Heisei 31 Apr 30 check actualmax week_of_month 5 - set date NewEra 1 May 1 + set date Reiwa 1 May 1 check actualmax week_of_month 5 use tokyocal clear all - set date NewEra $maxyear Jan 1 - # the last date of NewEra is N292276976.08.17T16:12:55.807+0900 (Sunday) + set date Reiwa $maxyear Jan 1 + # the last date of Reiwa is R292276976.08.17T16:12:55.807+0900 (Sunday) # The year is equivalent to 2003 (Gregorian). check actualmax week_of_month 4 @@ -269,11 +269,11 @@ set date Heisei 1 Aug 18 check actualmax year 30 - set date NewEra 1 Apr 30 + set date Reiwa 1 Apr 30 check actualmax year 31 # Date/time beyond the last date in the max year. - set date NewEra 1 Aug 18 + set date Reiwa 1 Aug 18 check actualmax year 292276975 test Least max YEAR --- old/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese_roll.cts 2019-03-31 21:00:54.651945388 -0700 +++ new/test/jdk/java/util/Calendar/CalendarTestScripts/japanese/japanese_roll.cts 2019-03-31 21:00:53.614925722 -0700 @@ -147,13 +147,13 @@ roll year -1 check date Heisei 31 Apr 30 - set date NewEra 2 Apr 30 + set date Reiwa 2 Apr 30 get max year assign $result $hmax roll year -1 - check date NewEra $hmax Apr 30 + check date Reiwa $hmax Apr 30 roll year 1 - check date NewEra 2 Apr 30 + check date Reiwa 2 Apr 30 test roll MONTH set date BeforeMeiji 1867 Dec 1 @@ -276,16 +276,16 @@ check date BeforeMeiji $minyear May 18 check timeofday 1 47 4 191 - set date NewEra 17 Jan 1 + set date Reiwa 17 Jan 1 get max year assign $result $max - set date NewEra $max Jul 28 + set date Reiwa $max Jul 28 roll month 1 - check date NewEra $max Aug 17 - set date NewEra $max Jul 28 + check date Reiwa $max Aug 17 + set date Reiwa $max Jul 28 set timeofday 23 59 59 999 roll month 1 - check date NewEra $max Aug 16 + check date Reiwa $max Aug 16 check timeofday 23 59 59 999 test roll WEEK_OF_YEAR --- old/test/jdk/java/util/Calendar/JapaneseEraNameTest.java 2019-03-31 21:01:01.935083513 -0700 +++ new/test/jdk/java/util/Calendar/JapaneseEraNameTest.java 2019-03-31 21:01:00.942064680 -0700 @@ -51,12 +51,12 @@ Object[][] names() { return new Object[][] { // type, locale, name - { LONG, JAPAN, "\u5143\u53f7" }, // NewEra - { LONG, US, "NewEra" }, - { LONG, CHINA, "NewEra" }, - { SHORT, JAPAN, "\u5143\u53f7" }, - { SHORT, US, "NewEra" }, - { SHORT, CHINA, "N" }, + { LONG, JAPAN, "\u4ee4\u548c" }, + { LONG, US, "Reiwa" }, + { LONG, CHINA, "Reiwa" }, + { SHORT, JAPAN, "\u4ee4\u548c" }, + { SHORT, US, "Reiwa" }, + { SHORT, CHINA, "R" }, }; } --- old/test/jdk/java/util/Calendar/JapaneseLenientEraTest.java 2019-03-31 21:01:08.897215559 -0700 +++ new/test/jdk/java/util/Calendar/JapaneseLenientEraTest.java 2019-03-31 21:01:07.794194638 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,7 +47,7 @@ // lenient era/year, strict era/year { "Meiji 123", "Heisei 2" }, { "Sh\u014dwa 65", "Heisei 2" }, - { "Heisei 32", "NewEra 2" }, // NewEra + { "Heisei 32", "Reiwa 2" }, }; } --- old/test/jdk/java/util/Calendar/NarrowNamesTest.java 2019-03-31 21:01:16.428358408 -0700 +++ new/test/jdk/java/util/Calendar/NarrowNamesTest.java 2019-03-31 21:01:15.228335646 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ HOUR_OF_DAY, 23); test(JAJPJP, DAY_OF_WEEK, LocalDateTime.now().isBefore(LocalDateTime.of(2019, 5, 1, 0, 0)) ? - "\u65e5" : "\u706b", // "Sun" for HEISEI, "Tue" for NEWERA + "\u65e5" : "\u706b", // "Sun" for HEISEI, "Tue" for REIWA YEAR, 24, MONTH, DECEMBER, DAY_OF_MONTH, 23); test(THTH, MONTH, NARROW_STANDALONE, "\u0e18.\u0e04.", YEAR, 2555, MONTH, DECEMBER, DAY_OF_MONTH, 5); --- old/test/jdk/java/util/Calendar/ZoneOffsets.java 2019-03-31 21:01:24.535512194 -0700 +++ new/test/jdk/java/util/Calendar/ZoneOffsets.java 2019-03-31 21:01:23.405490758 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -240,11 +240,11 @@ } private static void adjustJapaneseEra(Calendar cal) { - // In case of Japanese calendar, explicitly set the last era; NEWERA so that + // In case of Japanese calendar, explicitly set the last era; REIWA so that // year 2005 won't throw exception if (!cal.isLenient() && cal.getCalendarType().equals("japanese") && - System.currentTimeMillis() < 1556668800000L) { // Current time not in NEWERA + System.currentTimeMillis() < 1556668800000L) { // Current time not in REIWA cal.set(Calendar.ERA, 5); cal.add(Calendar.YEAR, -30); // -30: Subtract year-length of HEISEI era }