mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8174268: Declare a public field in JapaneseEra for the era starting May 2019
Reviewed-by: rriggs, chegar
This commit is contained in:
parent
2a510a6353
commit
0b2e2ca9bd
7 changed files with 37 additions and 27 deletions
|
@ -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
|
||||
|
@ -363,9 +363,8 @@ public final class JapaneseChronology extends AbstractChronology implements Seri
|
|||
/**
|
||||
* Returns the calendar system era object from the given numeric value.
|
||||
*
|
||||
* See the description of each Era for the numeric values of:
|
||||
* {@link JapaneseEra#HEISEI}, {@link JapaneseEra#SHOWA},{@link JapaneseEra#TAISHO},
|
||||
* {@link JapaneseEra#MEIJI}), only Meiji and later eras are supported.
|
||||
* The numeric values supported by this method are the same as the
|
||||
* numeric values supported by {@link JapaneseEra#of(int)}.
|
||||
*
|
||||
* @param eraValue the era value
|
||||
* @return the Japanese {@code Era} for the given numeric era value
|
||||
|
|
|
@ -152,9 +152,10 @@ public final class JapaneseEra
|
|||
public static final JapaneseEra HEISEI = new JapaneseEra(2, LocalDate.of(1989, 1, 8));
|
||||
/**
|
||||
* The singleton instance for the 'Reiwa' era (2019-05-01 - )
|
||||
* which has the value 3.
|
||||
* which has the value 3. The end date of this era is not specified, unless
|
||||
* the Japanese Government defines it.
|
||||
*/
|
||||
private static final JapaneseEra REIWA = new JapaneseEra(3, LocalDate.of(2019, 5, 1));
|
||||
public 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.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2017, 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
|
||||
|
@ -114,8 +114,8 @@ import java.util.Map;
|
|||
* <td>B.E. (Buddhist Era)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th scope="row" rowspan="6" style="font-weight:normal; text-align:left; vertical-align:top">{@code "japanese"}</th>
|
||||
* <th scope="row" rowspan="5" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
|
||||
* <th scope="row" rowspan="7" style="font-weight:normal; text-align:left; vertical-align:top">{@code "japanese"}</th>
|
||||
* <th scope="row" rowspan="6" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#ERA}</th>
|
||||
* <th scope="row" style="font-weight:normal">0</th>
|
||||
* <td>Seireki (Before Meiji)</td>
|
||||
* </tr>
|
||||
|
@ -133,7 +133,11 @@ import java.util.Map;
|
|||
* </tr>
|
||||
* <tr>
|
||||
* <th scope="row" style="font-weight:normal">4</th>
|
||||
* <td >Heisei</td>
|
||||
* <td>Heisei</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th scope="row" style="font-weight:normal">5</th>
|
||||
* <td>Reiwa</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th scope="row" style="font-weight:normal; text-align:left; vertical-align:top">{@link Calendar#YEAR}</th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue