GeezerVison is showing docs.oracle.com — JapaneseEra (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.time.chrono
Class JapaneseEra
-
-
Field Summary
Fields
| Modifier and Type |
Field |
Description |
static JapaneseEra |
HEISEI |
The singleton instance for the 'Heisei' era (1989-01-08 - 2019-04-30)
which has the value 2.
|
static JapaneseEra |
MEIJI |
The singleton instance for the 'Meiji' era (1868-01-01 - 1912-07-29)
which has the value -1.
|
static JapaneseEra |
SHOWA |
The singleton instance for the 'Showa' era (1926-12-25 - 1989-01-07)
which has the value 1.
|
static JapaneseEra |
TAISHO |
The singleton instance for the 'Taisho' era (1912-07-30 - 1926-12-24)
which has the value 0.
|
-
-
Method Detail
-
getValue
public int getValue()
Gets the numeric era int value.
The SHOWA era that contains 1970-01-01 (ISO calendar system) has the value 1.
Later eras are numbered from 2 (HEISEI).
Earlier eras are numbered 0 (TAISHO), -1 (MEIJI)).
- Specified by:
getValue in interface Era
- Returns:
- the era value
-
toString
public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
- Overrides:
toString in class Object
- Returns:
- a string representation of the object.
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|