Era represents a calendar era that defines a
period of time in which the same year numbering is used. For
example, Gregorian year 2004 is Heisei 16 in the Japanese
calendar system. An era starts at any point of time (Gregorian) that is
represented by CalendarDate.
Eras that are applicable to a particular calendar
system can be obtained by calling CalendarSystem#getEras
one of which can be used to specify a date in
CalendarDate.
The following era names are defined in this release.
Calendar system Era name Since (in Gregorian)
-----------------------------------------------------------------------
Japanese calendar Meiji 1868-01-01T00:00:00 local time
Taisho 1912-07-30T00:00:00 local time
Showa 1926-12-25T00:00:00 local time
Heisei 1989-01-08T00:00:00 local time
Reiwa 2019-05-01T00:00:00 local time
-----------------------------------------------------------------------
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private int | |
| private final boolean | |
| private final String | |
| private final long | |
| private final CalendarDate |
| Access | Constructor and Description |
|---|---|
| public | Era(String
the era name (e.g., "BeforeCommonEra" for the Julian calendar system) name, String the abbreviation of the era name (e.g., "B.C.E." for "BeforeCommonEra") abbr, long the time (millisecond offset from January 1, 1970
(Gregorian) UTC or local time) when the era starts, inclusive. since, boolean true if since
specifies a local time; false if
since specifies UTCConstructs an |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public String | |
| public String | |
| public long | |
| public CalendarDate | |
| public int | |
| public boolean | |
| public String |
| abbr | back to summary |
|---|---|
| private final String abbr | |
| hash | back to summary |
|---|---|
| private int hash | |
| localTime | back to summary |
|---|---|
| private final boolean localTime | |
| name | back to summary |
|---|---|
| private final String name | |
| since | back to summary |
|---|---|
| private final long since | |
| sinceDate | back to summary |
|---|---|
| private final CalendarDate sinceDate | |
| Era | back to summary |
|---|---|
| public Era(String name, String abbr, long since, boolean localTime) Constructs an
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAbbreviation | back to summary |
|---|---|
| public String getAbbreviation() | |
| getDisplayName | back to summary |
|---|---|
| public String getDisplayName(Locale locale) | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getSince | back to summary |
|---|---|
| public long getSince(TimeZone zone) | |
| getSinceDate | back to summary |
|---|---|
| public CalendarDate getSinceDate() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isLocalTime | back to summary |
|---|---|
| public boolean isLocalTime() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |