Class OldHinduLunarCalendar

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ModifiedHinduLunarBRCalendar, ModifiedHinduLunarCalendar

public class OldHinduLunarCalendar extends OldHinduSolarCalendar
Implementation of the Old Hindu Lunar calendar (Surya Siddhanta). * @version 2.1
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Field Details

    • MONTHS

      protected static final String[] MONTHS
      List of Hindu lunar month names.
    • LUNARMONTH

      protected static final Rational LUNARMONTH
      The length of a synodic month (new moon to new moon) in days.
    • LUNARDAY

      protected static final Rational LUNARDAY
      The length of a tithi (lunar day) in days.
    • leap

      protected boolean leap
      True if the current month is a leap month (adhika māsa).
  • Constructor Details

    • OldHinduLunarCalendar

      public OldHinduLunarCalendar()
    • OldHinduLunarCalendar

      public OldHinduLunarCalendar(long l)
    • OldHinduLunarCalendar

      public OldHinduLunarCalendar(AlternateCalendar altcalendar)
    • OldHinduLunarCalendar

      public OldHinduLunarCalendar(int i, int j, int k)
    • OldHinduLunarCalendar

      public OldHinduLunarCalendar(int i, boolean flag, int j, int k)
  • Method Details

    • isLeapYear

      protected static boolean isLeapYear(int i)
    • recomputeFromRD

      protected void recomputeFromRD()
      Description copied from class: AlternateCalendar
      Recomputes the calendar-specific fields from the current Rata Die. Called after setting the RD value.
      Overrides:
      recomputeFromRD in class OldHinduSolarCalendar
    • recomputeRD

      protected void recomputeRD()
      Description copied from class: AlternateCalendar
      Recomputes the Rata Die from the calendar-specific fields. Called after setting individual calendar fields.
      Overrides:
      recomputeRD in class OldHinduSolarCalendar
    • set

      public void set(int i, int j, int k)
      Description copied from class: MonthDayYear
      Sets the calendar to the specified date and recomputes the Rata Die.
      Overrides:
      set in class OldHinduSolarCalendar
      Parameters:
      i - the year
      j - the month
      k - the day of month
    • set

      public void set(int i, boolean flag, int j, int k)
    • set

      public void set(long l)
      Description copied from class: AlternateCalendar
      Sets this calendar to the specified Rata Die and recomputes the calendar fields.
      Overrides:
      set in class OldHinduSolarCalendar
      Parameters:
      l - the new Rata Die value
    • monthName

      protected String monthName()
      Description copied from class: MonthDayYear
      Returns the name of the current month.
      Overrides:
      monthName in class OldHinduSolarCalendar
      Returns:
      the month name
    • getSuffix

      protected String getSuffix()
      Description copied from class: MonthDayYear
      Returns the era suffix for display (e.g., "CE", "BCE", "AH").
      Overrides:
      getSuffix in class OldHinduSolarCalendar
      Returns:
      the suffix string
    • getMonths

      public Enumeration<String> getMonths()
      Description copied from class: MonthDayYear
      Returns an enumeration of all month names for this calendar.
      Overrides:
      getMonths in class OldHinduSolarCalendar
      Returns:
      month names enumeration
    • getLeap

      public boolean getLeap()
    • main

      public static void main(String[] args)