public enum HistoricEra extends java.lang.Enum<HistoricEra> implements 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.
| Enum Constant and Description |
|---|
AB_URBE_CONDITA
Diese mit
AD überlappende Alternative wurde von Chronisten verwendet,
um die Jahre seit der angenommenen Gründung der Stadt Rom zu zählen
(753 BC - version of Varro). |
AD
AD = Anno Domini
Years related to this era must not be smaller than
1. |
BC
BC = Before Christian
Years related to this era are counted backwards and must not be smaller than
1. |
BYZANTINE
Years are reckoned since the assumed year of creation of the world (Anno Mundi) in 5508 BC.
|
HISPANIC
Years are reckoned from 38 BC onwards (Era of Caesars or Spanish Era).
|
| Modifier and Type | Method and Description |
|---|---|
int |
annoDomini(int yearOfEra)
Scales given year of era to its mathematical AD value.
|
java.lang.String |
getAlternativeName(java.util.Locale locale,
TextWidth width)
Gets an alternative description text dependent on the locale and text width.
|
java.lang.String |
getDisplayName(java.util.Locale locale,
TextWidth width)
Gets the description text dependent on the locale and text width.
|
int |
getValue()
Yields an ordinal number which is scaled such that every era
which contains the ISO-date of UTC-epoch [1972-01-01] will have
the associated value
1. |
static HistoricEra |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HistoricEra[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfnamepublic static final HistoricEra BC
BC = Before Christian
Years related to this era are counted backwards and must not be smaller than 1.
public static final HistoricEra AD
AD = Anno Domini
Years related to this era must not be smaller than 1.
public static final HistoricEra HISPANIC
Years are reckoned from 38 BC onwards (Era of Caesars or Spanish Era).
This overlapping alternative to AD was used in Spain (until 1383), Portugal (until 1422)
and southern part of France.
Links:
public static final HistoricEra 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.
NewYearRule.BEGIN_OF_SEPTEMBERpublic static final HistoricEra AB_URBE_CONDITA
public static HistoricEra[] values()
for (HistoricEra c : HistoricEra.values()) System.out.println(c);
public static HistoricEra valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int getValue()
CalendarEraYields an ordinal number which is scaled such that every era
which contains the ISO-date of UTC-epoch [1972-01-01] will have
the associated value 1.
Attention: This number is neither necessarily unique nor does it imply any chronological order.
getValue in interface CalendarErapublic java.lang.String getDisplayName(java.util.Locale locale,
TextWidth width)
Gets the description text dependent on the locale and text width.
locale - language settingwidth - text widthnull)public java.lang.String getAlternativeName(java.util.Locale locale,
TextWidth width)
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).
locale - language settingwidth - text widthnull)public int annoDomini(int yearOfEra)
Scales given year of era to its mathematical AD value.
yearOfEra - historic year reckoned in this erajava.lang.IllegalArgumentException - if given year of era is out of range