135 * which has the value -1.
136 */
137 public static final JapaneseEra MEIJI = new JapaneseEra(-1, LocalDate.of(1868, 1, 1));
138 /**
139 * The singleton instance for the 'Taisho' era (1912-07-30 - 1926-12-24)
140 * which has the value 0.
141 */
142 public static final JapaneseEra TAISHO = new JapaneseEra(0, LocalDate.of(1912, 7, 30));
143 /**
144 * The singleton instance for the 'Showa' era (1926-12-25 - 1989-01-07)
145 * which has the value 1.
146 */
147 public static final JapaneseEra SHOWA = new JapaneseEra(1, LocalDate.of(1926, 12, 25));
148 /**
149 * The singleton instance for the 'Heisei' era (1989-01-08 - 2019-04-30)
150 * which has the value 2.
151 */
152 public static final JapaneseEra HEISEI = new JapaneseEra(2, LocalDate.of(1989, 1, 8));
153 /**
154 * The singleton instance for the 'Reiwa' era (2019-05-01 - )
155 * which has the value 3.
156 */
157 private static final JapaneseEra REIWA = new JapaneseEra(3, LocalDate.of(2019, 5, 1));
158
159 // The number of predefined JapaneseEra constants.
160 // There may be a supplemental era defined by the property.
161 private static final int N_ERA_CONSTANTS = REIWA.getValue() + ERA_OFFSET;
162
163 /**
164 * Serialization version.
165 */
166 private static final long serialVersionUID = 1466499369062886794L;
167
168 // array for the singleton JapaneseEra instances
169 private static final JapaneseEra[] KNOWN_ERAS;
170
171 static {
172 ERA_CONFIG = JapaneseChronology.JCAL.getEras();
173
174 KNOWN_ERAS = new JapaneseEra[ERA_CONFIG.length];
175 KNOWN_ERAS[0] = MEIJI;
176 KNOWN_ERAS[1] = TAISHO;
177 KNOWN_ERAS[2] = SHOWA;
|
135 * which has the value -1.
136 */
137 public static final JapaneseEra MEIJI = new JapaneseEra(-1, LocalDate.of(1868, 1, 1));
138 /**
139 * The singleton instance for the 'Taisho' era (1912-07-30 - 1926-12-24)
140 * which has the value 0.
141 */
142 public static final JapaneseEra TAISHO = new JapaneseEra(0, LocalDate.of(1912, 7, 30));
143 /**
144 * The singleton instance for the 'Showa' era (1926-12-25 - 1989-01-07)
145 * which has the value 1.
146 */
147 public static final JapaneseEra SHOWA = new JapaneseEra(1, LocalDate.of(1926, 12, 25));
148 /**
149 * The singleton instance for the 'Heisei' era (1989-01-08 - 2019-04-30)
150 * which has the value 2.
151 */
152 public static final JapaneseEra HEISEI = new JapaneseEra(2, LocalDate.of(1989, 1, 8));
153 /**
154 * The singleton instance for the 'Reiwa' era (2019-05-01 - )
155 * which has the value 3. The end date of this era is not specified, unless
156 * the Japanese Government defines it.
157 */
158 public static final JapaneseEra REIWA = new JapaneseEra(3, LocalDate.of(2019, 5, 1));
159
160 // The number of predefined JapaneseEra constants.
161 // There may be a supplemental era defined by the property.
162 private static final int N_ERA_CONSTANTS = REIWA.getValue() + ERA_OFFSET;
163
164 /**
165 * Serialization version.
166 */
167 private static final long serialVersionUID = 1466499369062886794L;
168
169 // array for the singleton JapaneseEra instances
170 private static final JapaneseEra[] KNOWN_ERAS;
171
172 static {
173 ERA_CONFIG = JapaneseChronology.JCAL.getEras();
174
175 KNOWN_ERAS = new JapaneseEra[ERA_CONFIG.length];
176 KNOWN_ERAS[0] = MEIJI;
177 KNOWN_ERAS[1] = TAISHO;
178 KNOWN_ERAS[2] = SHOWA;
|