Enum Class HijriAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<HijriAlgorithm>
,java.lang.constant.Constable
,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 ConstantDescriptionUses 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 TypeMethodDescriptionYields the variant name of a calendar system.static HijriAlgorithm
Returns the enum constant of this class with the specified name.static HijriAlgorithm[]
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
-
Enum Constant Details
-
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
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
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
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
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
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
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
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
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
-
getVariant
Description copied from interface:VariantSource
Yields the variant name of a calendar system.
- Specified by:
getVariant
in interfaceVariantSource
- Returns:
- String which is empty if there are no variants
-