Class EraPreference

java.lang.Object
net.time4j.history.EraPreference

public final class EraPreference extends Object

Determines the preferred historic era to be used for printing a historic date.

Since:
3.14/4.11
Author:
Meno Hochschild
  • Method Details

    • hispanicUntil

      public static EraPreference hispanicUntil(PlainDate end)

      Determines the hispanic era to be preferred until given date.

      Parameters:
      end - last date when the hispanic era shall be used (inclusive)
      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.HISPANIC
    • hispanicBetween

      public static EraPreference hispanicBetween(PlainDate start, PlainDate end)

      Determines the hispanic era to be preferred within given date range.

      Parameters:
      start - first date when the hispanic era shall be used (inclusive)
      end - last date when the hispanic era shall be used (inclusive)
      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.HISPANIC
    • byzantineUntil

      public static EraPreference byzantineUntil(PlainDate end)

      Determines the era Anno Mundi to be preferred until given date.

      Parameters:
      end - last date when the era Anno Mundi shall be used (inclusive)
      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.BYZANTINE
    • byzantineBetween

      public static EraPreference byzantineBetween(PlainDate start, PlainDate end)

      Determines the era Anno Mundi to be preferred within given date range.

      Parameters:
      start - first date when the era Anno Mundi shall be used (inclusive)
      end - last date when the era Anno Mundi shall be used (inclusive)
      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.BYZANTINE
    • abUrbeCondita

      public static EraPreference abUrbeCondita()

      Determines the era Ab Urbe Condita to be preferred.

      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.AB_URBE_CONDITA
    • abUrbeConditaUntil

      public static EraPreference abUrbeConditaUntil(PlainDate end)

      Determines the era Ab Urbe Condita to be preferred until given date.

      Parameters:
      end - last date when the era A.U.C. shall be used (inclusive)
      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.AB_URBE_CONDITA
    • abUrbeConditaBetween

      public static EraPreference abUrbeConditaBetween(PlainDate start, PlainDate end)

      Determines the era Ab Urbe Condita to be preferred within given date range.

      Parameters:
      start - first date when the era A.U.C. shall be used (inclusive)
      end - last date when the era A.U.C. shall be used (inclusive)
      Returns:
      EraPreference
      Since:
      3.14/4.11
      See Also:
      HistoricEra.AB_URBE_CONDITA
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()

      For debugging purposes.

      Overrides:
      toString in class Object
      Returns:
      description of content