Interface IslamicCalendar.Algorithm

All Known Implementing Classes:
IslamicCalendar.CivilAlgorithm, IslamicCalendar.IslamicAlgorithm, IslamicCalendar.TBLAAlgorithm, IslamicCalendar.UmalquraAlgorithm
Enclosing class:
IslamicCalendar

private static interface IslamicCalendar.Algorithm
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    compute(long julianDays, long current, IntConsumer yearConsumer, IntConsumer monthConsumer, IntConsumer dayOfMonthConsumer, IntConsumer dayOfYearConsumer)
    Compute the year, month, dayOfMonth, and dayOfYear of the given julian days and current time and feed the caculuated results to the consumers.
    long
    Return the epoch used by this algorithm.
    Return the type the algorithm implement.
    boolean
    Returns true if this object is using the fixed-cycle civil calendar, or false if using the religious, astronomical calendar.
    int
    monthLength(int year, int month)
    Return the length (in days) of the given month.
    long
    monthStart(int year, int month)
    Return the day # on which the given month starts.
    int
    yearLength(int year)
    Return the length (in days) of the given year.
    long
    yearStart(int year)
    Return the day # on which the given year starts.
  • Method Details

    • isCivil

      boolean isCivil()
      Returns true if this object is using the fixed-cycle civil calendar, or false if using the religious, astronomical calendar.
    • getType

      Return the type the algorithm implement.
    • epoch

      long epoch()
      Return the epoch used by this algorithm.
    • yearStart

      long yearStart(int year)
      Return the day # on which the given year starts. Days are counted from the Hijri epoch, origin 0.
      Parameters:
      year - The hijri year
    • monthStart

      long monthStart(int year, int month)
      Return the day # on which the given month starts. Days are counted from the Hijri epoch, origin 0.
      Parameters:
      year - The hijri year
      month - The hijri month, 0-based
    • monthLength

      int monthLength(int year, int month)
      Return the length (in days) of the given month.
      Parameters:
      year - The hijri year
      month - The hijri month, 0-based
    • yearLength

      int yearLength(int year)
      Return the length (in days) of the given year.
      Parameters:
      year - The hijri year
    • compute

      void compute(long julianDays, long current, IntConsumer yearConsumer, IntConsumer monthConsumer, IntConsumer dayOfMonthConsumer, IntConsumer dayOfYearConsumer)
      Compute the year, month, dayOfMonth, and dayOfYear of the given julian days and current time and feed the caculuated results to the consumers.
      Parameters:
      julianDays -
      current - the time in millisecond.
      yearConsumer - consumer to take the year result.
      monthConsumer - consumer to take the month result.
      dayOfMonthConsumer - consumer to take the dayOfMonth result.
      dayOfYearConsumer - consumer to take the dayOfYear result.