Class HijriAdjustment

java.lang.Object
net.time4j.calendar.HijriAdjustment
All Implemented Interfaces:
VariantSource

public final class HijriAdjustment extends Object implements 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 Details

    • ofUmalqura

      public static HijriAdjustment ofUmalqura(int adjustment)

      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

      public static HijriAdjustment of(String variant, int adjustment)

      Defines a day adjustment of the given Hijri calendar variant.

      Parameters:
      variant - basic variant
      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

      public static HijriAdjustment of(VariantSource variantSource, int adjustment)

      Defines a day adjustment of the given Hijri calendar variant.

      Parameters:
      variantSource - source of variant
      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
    • 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
    • getValue

      public int getValue()

      Obtains the adjustment in days.

      Returns:
      int