Class ModifiedHinduLunarBRCalendar
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.OldHinduLunarCalendar
org.episteme.social.history.calendars.ModifiedHinduLunarBRCalendar
- All Implemented Interfaces:
Serializable
Modified Hindu Lunar calendar using arbitrary-precision arithmetic.
This version uses Rational for precise lunar calculations
without floating-point errors.
* @version 2.1
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanTrue if this is a duplicated (leap) day.protected static final intOffset for the lunar era (Vikrama Era).protected static org.episteme.social.history.calendars.ModifiedHinduBRCalendarDelegate for Hindu astronomical calculations.Fields inherited from class OldHinduLunarCalendar
leap, LUNARDAY, LUNARMONTH, MONTHSFields inherited from class OldHinduSolarCalendar
EPOCH, JOVIANPERIOD, 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
ConstructorsConstructorDescriptionModifiedHinduLunarBRCalendar(int i, boolean flag, int j, boolean flag1, int k) ModifiedHinduLunarBRCalendar(long l) ModifiedHinduLunarBRCalendar(AlternateCalendar altcalendar) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic voidbooleanprecedes(ModifiedHinduLunarBRCalendar modhindulunarbr) voidRecomputes the calendar-specific fields from the current Rata Die.voidRecomputes the Rata Die from the calendar-specific fields.voidset(int i, boolean flag, int j, boolean flag1, int k) toString()Returns a string representation of this date.Methods inherited from class OldHinduLunarCalendar
getLeap, getMonths, getSuffix, isLeapYear, monthName, set, set, setMethods inherited from class OldHinduSolarCalendar
dayCount, jovianYearMethods inherited from class MonthDayYear
getDay, getMonth, getYearMethods 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
-
LUNARERA
protected static final int LUNARERAOffset for the lunar era (Vikrama Era).- See Also:
-
mh
protected static org.episteme.social.history.calendars.ModifiedHinduBRCalendar mhDelegate for Hindu astronomical calculations. -
leapday
protected boolean leapdayTrue if this is a duplicated (leap) day.
-
-
Constructor Details
-
ModifiedHinduLunarBRCalendar
public ModifiedHinduLunarBRCalendar(long l) -
ModifiedHinduLunarBRCalendar
-
ModifiedHinduLunarBRCalendar
public ModifiedHinduLunarBRCalendar() -
ModifiedHinduLunarBRCalendar
public ModifiedHinduLunarBRCalendar(int i, boolean flag, int j, boolean flag1, int k)
-
-
Method Details
-
set
public void set(int i, boolean flag, int j, boolean flag1, int k) -
recomputeFromRD
public void recomputeFromRD()Description copied from class:AlternateCalendarRecomputes the calendar-specific fields from the current Rata Die. Called after setting the RD value.- Overrides:
recomputeFromRDin classOldHinduLunarCalendar
-
precedes
-
recomputeRD
public void recomputeRD()Description copied from class:AlternateCalendarRecomputes the Rata Die from the calendar-specific fields. Called after setting individual calendar fields.- Overrides:
recomputeRDin classOldHinduLunarCalendar
-
getLeapDay
public boolean getLeapDay() -
toString
Description copied from class:MonthDayYearReturns a string representation of this date.- Overrides:
toStringin classMonthDayYear- Returns:
- formatted date string
-
main
-