Class ModifiedHinduSolarCalendar
java.lang.Object
org.episteme.social.history.calendars.AlternateCalendar
org.episteme.social.history.calendars.SevenDaysWeek
org.episteme.social.history.calendars.MonthDayYear
org.episteme.social.history.calendars.OldHinduSolarCalendar
org.episteme.social.history.calendars.ModifiedHinduSolarCalendar
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static org.episteme.social.history.calendars.ModifiedHinduCalendarDelegate for Hindu astronomical calculations.protected static final intOffset for the solar era (Saka Era).Fields inherited from class OldHinduSolarCalendar
EPOCH, JOVIANPERIOD, MONTHS, SIDEREALYEAR, SOLARMONTHFields inherited from class MonthDayYear
day, month, yearFields inherited from class SevenDaysWeek
DAY_NAMES, FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY, TUESDAY, WEDNESDAYFields inherited from class AlternateCalendar
JD_EPOCH, rd, unicode -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ModifiedHinduSolarCalendar object.ModifiedHinduSolarCalendar(int i, int j, int k) Creates a new ModifiedHinduSolarCalendar object.ModifiedHinduSolarCalendar(long l) Creates a new ModifiedHinduSolarCalendar object.ModifiedHinduSolarCalendar(AlternateCalendar altcalendar) Creates a new ModifiedHinduSolarCalendar object. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns the era suffix for this calendar.static voidMain method for testing Hindu solar calendar calculations.booleanprecedes(ModifiedHinduSolarCalendar modhindusolar) Checks if this date precedes another Hindu solar date.voidRecomputes the Hindu solar date components from the current Rata Die number.voidRecomputes the Rata Die number from the current Hindu solar date components.Methods inherited from class OldHinduSolarCalendar
dayCount, getMonths, jovianYear, monthName, set, setMethods inherited from class MonthDayYear
getDay, getMonth, getYear, toStringMethods inherited from class SevenDaysWeek
kDayAfter, kDayBefore, kDayNearest, kDayOnOrAfter, kDayOnOrBefore, nthKDay, weekDay, weekDayNameMethods inherited from class AlternateCalendar
add, amod, difference, difference, floorDiv, fromJD, isAfter, isBefore, mod, mod, subtract, toJD, toJD, toRD
-
Field Details
-
SOLARERA
protected static final int SOLARERAOffset for the solar era (Saka Era).- See Also:
-
mh
protected static org.episteme.social.history.calendars.ModifiedHinduCalendar mhDelegate for Hindu astronomical calculations.
-
-
Constructor Details
-
ModifiedHinduSolarCalendar
public ModifiedHinduSolarCalendar(long l) Creates a new ModifiedHinduSolarCalendar object.- Parameters:
l- Rata Die number.
-
ModifiedHinduSolarCalendar
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:
recomputeFromRDin classOldHinduSolarCalendar
-
precedes
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:
recomputeRDin classOldHinduSolarCalendar- Throws:
InconsistentDateException- if the date is invalid.
-
getSuffix
Returns the era suffix for this calendar.- Overrides:
getSuffixin classOldHinduSolarCalendar- Returns:
- the suffix string.
-
main
Main method for testing Hindu solar calendar calculations.- Parameters:
args- command line arguments.
-