Package net.time4j.calendar
Class HijriAdjustment
java.lang.Object
net.time4j.calendar.HijriAdjustment
- All Implemented Interfaces:
VariantSource
Represents a small day adjustment to any islamic calendar variant.
Many local islamic authorities decide their own rules when to start a new month. This class can help in such situations when the rules are not predictable but based on sighting of New Moon.
- Since:
- 3.32/4.27
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Obtains the adjustment in days.Yields the variant name of a calendar system.static HijriAdjustment
Defines a day adjustment of the given Hijri calendar variant.static HijriAdjustment
of(VariantSource variantSource, int adjustment)
Defines a day adjustment of the given Hijri calendar variant.static HijriAdjustment
ofUmalqura(int adjustment)
Defines a day adjustment of the Umalqura-variant of Hijri calendar.
-
Method Details
-
ofUmalqura
Defines a day adjustment of the Umalqura-variant of Hijri calendar.
- Parameters:
adjustment
- small adjustment in days between -3 and 3 (inclusive)- Returns:
- new instance of
HijriAdjustment
- Throws:
ChronoException
- if the adjustment is out of range-3 <= adjustment <= 3
-
of
Defines a day adjustment of the given Hijri calendar variant.
- Parameters:
variant
- basic variantadjustment
- small adjustment in days between -3 and 3 (inclusive)- Returns:
- new instance of
HijriAdjustment
- Throws:
ChronoException
- if the adjustment is out of range-3 <= adjustment <= 3
-
of
Defines a day adjustment of the given Hijri calendar variant.
- Parameters:
variantSource
- source of variantadjustment
- small adjustment in days between -3 and 3 (inclusive)- Returns:
- new instance of
HijriAdjustment
- Throws:
ChronoException
- if the adjustment is out of range-3 <= adjustment <= 3
-
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
-
getValue
public int getValue()Obtains the adjustment in days.
- Returns:
- int
-