Enum Class HijriAlgorithm

java.lang.Object
java.lang.Enum<HijriAlgorithm>
net.time4j.calendar.HijriAlgorithm
All Implemented Interfaces:
Serializable, Comparable<HijriAlgorithm>, java.lang.constant.Constable, VariantSource

public enum HijriAlgorithm extends Enum<HijriAlgorithm> implements VariantSource

Describes islamic calendar variants based on simplistic deterministic algorithms.

Most algorithms uses a leap year pattern within a 30-year-cycle. All years have 12 months where the month lengths are alternately 30 or 29 with the exception of last month which has 30 days in leap years else 29 days. The supported range in islamic years is 1-1600.

Note that all these algorithms have approximated nature only. There are deviations from sighting-based variants especially in short term. However, main advantage of algorithm-based variants is the fact that they can be applied into far past or future. Keep in mind that sighting-based calendars have a much more constrained valid range. For more background see The Arithmetical or Tabular Islamic Calendar.

Since:
3.6/4.4
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 Constants
    Enum Constant
    Description
    Uses the leap year pattern {2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29} with astronomical (Thursday) epoch.
    Uses the leap year pattern {2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29} with civil (Friday) epoch.
    Uses the leap year pattern {2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29} with astronomical (Thursday) epoch.
    Uses the leap year pattern {2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29} with civil (Friday) epoch.
    Uses the leap year pattern {2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30} with astronomical (Thursday) epoch.
    Uses the leap year pattern {2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30} with civil (Friday) epoch.
    Uses the leap year pattern {2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29} with astronomical (Thursday) epoch.
    Uses the leap year pattern {2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29} with civil (Friday) epoch.
  • Method Summary

    Modifier and Type
    Method
    Description
    Yields the variant name of a calendar system.
    valueOf​(String name)
    Returns the enum constant of this class with the specified name.
    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 class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • EAST_ISLAMIC_CIVIL

      public static final HijriAlgorithm EAST_ISLAMIC_CIVIL
      Uses the leap year pattern {2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29} with civil (Friday) epoch. Variant name: "islamic-eastc"
    • EAST_ISLAMIC_ASTRO

      public static final HijriAlgorithm EAST_ISLAMIC_ASTRO
      Uses the leap year pattern {2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29} with astronomical (Thursday) epoch. Variant name: "islamic-easta"
    • WEST_ISLAMIC_CIVIL

      public static final HijriAlgorithm WEST_ISLAMIC_CIVIL
      Uses the leap year pattern {2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29} with civil (Friday) epoch. Variant name: "islamic-civil"
    • WEST_ISLAMIC_ASTRO

      public static final HijriAlgorithm WEST_ISLAMIC_ASTRO
      Uses the leap year pattern {2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29} with astronomical (Thursday) epoch. Variant name: "islamic-tbla". This variant is equivalent to Microsoft Hijri (Kuwaiti) calendar.
    • FATIMID_CIVIL

      public static final HijriAlgorithm FATIMID_CIVIL
      Uses the leap year pattern {2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29} with civil (Friday) epoch. Variant name: "islamic-fatimidc"
    • FATIMID_ASTRO

      public static final HijriAlgorithm FATIMID_ASTRO
      Uses the leap year pattern {2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29} with astronomical (Thursday) epoch. Variant name: "islamic-fatimida"
    • HABASH_AL_HASIB_CIVIL

      public static final HijriAlgorithm HABASH_AL_HASIB_CIVIL
      Uses the leap year pattern {2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30} with civil (Friday) epoch. Variant name: "islamic-habashalhasibc"
    • HABASH_AL_HASIB_ASTRO

      public static final HijriAlgorithm HABASH_AL_HASIB_ASTRO
      Uses the leap year pattern {2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30} with astronomical (Thursday) epoch. Variant name: "islamic-habashalhasiba"
  • Method Details

    • values

      public static HijriAlgorithm[] 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 HijriAlgorithm 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
    • getVariant

      public String getVariant()
      Description copied from interface: VariantSource

      Yields the variant name of a calendar system.

      Specified by:
      getVariant in interface VariantSource
      Returns:
      String which is empty if there are no variants