Class ModifiedHinduSolarCalendar

All Implemented Interfaces:
Serializable

public class ModifiedHinduSolarCalendar extends OldHinduSolarCalendar
Modified Hindu Solar calendar using floating-point arithmetic. This calendar uses modern astronomical calculations for more accurate solar month determinations. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Field Details

    • SOLARERA

      protected static final int SOLARERA
      Offset for the solar era (Saka Era).
      See Also:
    • mh

      protected static org.episteme.social.history.calendars.ModifiedHinduCalendar mh
      Delegate for Hindu astronomical calculations.
  • Constructor Details

    • ModifiedHinduSolarCalendar

      public ModifiedHinduSolarCalendar(long l)
      Creates a new ModifiedHinduSolarCalendar object.
      Parameters:
      l - Rata Die number.
    • ModifiedHinduSolarCalendar

      public ModifiedHinduSolarCalendar(AlternateCalendar altcalendar)
      Creates a new ModifiedHinduSolarCalendar object.
      Parameters:
      altcalendar - another calendar to initialize from.
    • ModifiedHinduSolarCalendar

      public ModifiedHinduSolarCalendar()
      Creates a new ModifiedHinduSolarCalendar object.
    • ModifiedHinduSolarCalendar

      public ModifiedHinduSolarCalendar(int i, int j, int k)
      Creates a new ModifiedHinduSolarCalendar object.
      Parameters:
      i - the month.
      j - the day.
      k - the year.
  • Method Details

    • recomputeFromRD

      public void recomputeFromRD()
      Recomputes the Hindu solar date components from the current Rata Die number.
      Overrides:
      recomputeFromRD in class OldHinduSolarCalendar
    • precedes

      public boolean precedes(ModifiedHinduSolarCalendar modhindusolar)
      Checks if this date precedes another Hindu solar date.
      Parameters:
      modhindusolar - the other date.
      Returns:
      true if this date is before the other.
    • recomputeRD

      public void recomputeRD()
      Recomputes the Rata Die number from the current Hindu solar date components.
      Overrides:
      recomputeRD in class OldHinduSolarCalendar
      Throws:
      InconsistentDateException - if the date is invalid.
    • getSuffix

      protected String getSuffix()
      Returns the era suffix for this calendar.
      Overrides:
      getSuffix in class OldHinduSolarCalendar
      Returns:
      the suffix string.
    • main

      public static void main(String[] args)
      Main method for testing Hindu solar calendar calculations.
      Parameters:
      args - command line arguments.