Enum Class HistoricEra
- All Implemented Interfaces:
Serializable
,Comparable<HistoricEra>
,java.lang.constant.Constable
,CalendarEra
Represents a historic era dividing the local timeline at roughly the point of Jesu birth in the context of the julian/gregorian calendar.
Important limitation in historic context: The early midage often used different eras for reckoning the years (not completely handled by Time4J). See also the webpage General Chronology.
- Since:
- 3.0
- Author:
- Meno Hochschild
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis overlapping alternative toAD
was used by chronists to count the years since the assumed founding of Rome (753 BC - version of Varro).AD = Anno DominiBC = Before ChristianYears are reckoned since the assumed year of creation of the world (Anno Mundi) in 5508 BC.Years are reckoned from 38 BC onwards (Era of Caesars or Spanish Era). -
Method Summary
Modifier and TypeMethodDescriptionint
annoDomini(int yearOfEra)
Scales given year of era to its mathematical AD value.getAlternativeName(Locale locale, TextWidth width)
Gets an alternative description text dependent on the locale and text width.getDisplayName(Locale locale, TextWidth width)
Gets the description text dependent on the locale and text width.static HistoricEra
Returns the enum constant of this class with the specified name.static HistoricEra[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.time4j.engine.CalendarEra
name
-
Enum Constant Details
-
BC
BC = Before Christian
Years related to this era are counted backwards and must not be smaller than
1
. -
AD
AD = Anno Domini
Years related to this era must not be smaller than
1
. -
HISPANIC
-
BYZANTINE
Years are reckoned since the assumed year of creation of the world (Anno Mundi) in 5508 BC.
This overlapping alternative to
AD
was mainly used in Russia before 1700 with the rule that years start on first of September. See also: Wikipedia.- See Also:
NewYearRule.BEGIN_OF_SEPTEMBER
-
AB_URBE_CONDITA
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
Gets the description text dependent on the locale and text width.
- Parameters:
locale
- language settingwidth
- text width- Returns:
- descriptive text for given locale and width (never
null
) - Since:
- 3.0
-
getAlternativeName
Gets an alternative description text dependent on the locale and text width.
This method yields for English the notations of "(Before) Common Era" (BCE/CE).
- Parameters:
locale
- language settingwidth
- text width- Returns:
- alternative descriptive text for given locale and width (never
null
) - Since:
- 3.0
-
annoDomini
public int annoDomini(int yearOfEra)Scales given year of era to its mathematical AD value.
- Parameters:
yearOfEra
- historic year reckoned in this era- Returns:
- year related to era AD
- Throws:
IllegalArgumentException
- if given year of era is out of range- Since:
- 3.19/4.15
-