Enum Class HistoricEra

java.lang.Object
java.lang.Enum<HistoricEra>
net.time4j.history.HistoricEra
All Implemented Interfaces:
Serializable, Comparable<HistoricEra>, java.lang.constant.Constable, CalendarEra

public enum HistoricEra extends 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.

Since:
3.0
Author:
Meno Hochschild
  • Enum Constant Details

    • BC

      public static final HistoricEra BC

      BC = Before Christian

      Years related to this era are counted backwards and must not be smaller than 1.

    • HISPANIC

      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. Historic dates before 38 BC use the era BC as fallback, however.

      Links:

    • BYZANTINE

      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.

      See Also:
      NewYearRule.BEGIN_OF_SEPTEMBER
    • AB_URBE_CONDITA

      public static final HistoricEra AB_URBE_CONDITA

      This overlapping alternative to AD was used by chronists to count the years since the assumed founding of Rome (753 BC - version of Varro).

      See also: Wikipedia.

  • Method Details

    • values

      public static HistoricEra[] 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

      public static HistoricEra valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName(Locale locale, TextWidth width)

      Gets the description text dependent on the locale and text width.

      Parameters:
      locale - language setting
      width - text width
      Returns:
      descriptive text for given locale and width (never null)
      Since:
      3.0
    • getAlternativeName

      public String getAlternativeName(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).

      Parameters:
      locale - language setting
      width - 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