Class OldHinduSolarCalendar

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ModifiedHinduSolarBRCalendar, ModifiedHinduSolarCalendar, OldHinduLunarCalendar

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

    • EPOCH

      protected static final long EPOCH
      The RD (Rata Die) number for the Old Hindu Solar calendar epoch (Kali Yuga).
    • SIDEREALYEAR

      protected static final Rational SIDEREALYEAR
      The length of the sidereal year in days.
    • JOVIANPERIOD

      protected static final Rational JOVIANPERIOD
      The Jovian period (cycle of Jupiter) in days.
    • SOLARMONTH

      protected static final Rational SOLARMONTH
      The length of a solar month in days.
    • MONTHS

      protected static final String[] MONTHS
      List of Hindu solar month names.
  • Constructor Details

    • OldHinduSolarCalendar

      public OldHinduSolarCalendar(long l)
    • OldHinduSolarCalendar

      public OldHinduSolarCalendar(AlternateCalendar altcalendar)
    • OldHinduSolarCalendar

      public OldHinduSolarCalendar()
    • OldHinduSolarCalendar

      public OldHinduSolarCalendar(int i, int j, int k)
  • Method Details

    • dayCount

      public long dayCount()
    • jovianYear

      public int jovianYear()
    • recomputeRD

      protected void recomputeRD()
      Description copied from class: AlternateCalendar
      Recomputes the Rata Die from the calendar-specific fields. Called after setting individual calendar fields.
      Specified by:
      recomputeRD in class AlternateCalendar
    • 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.
      Specified by:
      recomputeFromRD in class AlternateCalendar
    • set

      public void set(long l)
      Description copied from class: AlternateCalendar
      Sets this calendar to the specified Rata Die and recomputes the calendar fields.
      Specified by:
      set in class AlternateCalendar
      Parameters:
      l - the new Rata Die value
    • 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 MonthDayYear
      Parameters:
      i - the year
      j - the month
      k - the day of month
    • monthName

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

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

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

      public static void main(String[] args)