Class OldHinduSolarCalendar
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
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ModifiedHinduSolarBRCalendar, ModifiedHinduSolarCalendar, OldHinduLunarCalendar
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final longThe RD (Rata Die) number for the Old Hindu Solar calendar epoch (Kali Yuga).protected static final RationalThe Jovian period (cycle of Jupiter) in days.protected static final String[]List of Hindu solar month names.protected static final RationalThe length of the sidereal year in days.protected static final RationalThe length of a solar month in days.Fields 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
ConstructorsConstructorDescriptionOldHinduSolarCalendar(int i, int j, int k) OldHinduSolarCalendar(long l) OldHinduSolarCalendar(AlternateCalendar altcalendar) -
Method Summary
Modifier and TypeMethodDescriptionlongdayCount()Returns an enumeration of all month names for this calendar.protected StringReturns the era suffix for display (e.g., "CE", "BCE", "AH").intstatic voidprotected StringReturns the name of the current month.protected voidRecomputes the calendar-specific fields from the current Rata Die.protected voidRecomputes the Rata Die from the calendar-specific fields.voidset(int i, int j, int k) Sets the calendar to the specified date and recomputes the Rata Die.voidset(long l) Sets this calendar to the specified Rata Die and recomputes the calendar fields.Methods 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
-
EPOCH
protected static final long EPOCHThe RD (Rata Die) number for the Old Hindu Solar calendar epoch (Kali Yuga). -
SIDEREALYEAR
The length of the sidereal year in days. -
JOVIANPERIOD
The Jovian period (cycle of Jupiter) in days. -
SOLARMONTH
The length of a solar month in days. -
MONTHS
List of Hindu solar month names.
-
-
Constructor Details
-
OldHinduSolarCalendar
public OldHinduSolarCalendar(long l) -
OldHinduSolarCalendar
-
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:AlternateCalendarRecomputes the Rata Die from the calendar-specific fields. Called after setting individual calendar fields.- Specified by:
recomputeRDin classAlternateCalendar
-
recomputeFromRD
protected void recomputeFromRD()Description copied from class:AlternateCalendarRecomputes the calendar-specific fields from the current Rata Die. Called after setting the RD value.- Specified by:
recomputeFromRDin classAlternateCalendar
-
set
public void set(long l) Description copied from class:AlternateCalendarSets this calendar to the specified Rata Die and recomputes the calendar fields.- Specified by:
setin classAlternateCalendar- Parameters:
l- the new Rata Die value
-
set
public void set(int i, int j, int k) Description copied from class:MonthDayYearSets the calendar to the specified date and recomputes the Rata Die.- Overrides:
setin classMonthDayYear- Parameters:
i- the yearj- the monthk- the day of month
-
monthName
Description copied from class:MonthDayYearReturns the name of the current month.- Specified by:
monthNamein classMonthDayYear- Returns:
- the month name
-
getSuffix
Description copied from class:MonthDayYearReturns the era suffix for display (e.g., "CE", "BCE", "AH").- Specified by:
getSuffixin classMonthDayYear- Returns:
- the suffix string
-
getMonths
Description copied from class:MonthDayYearReturns an enumeration of all month names for this calendar.- Specified by:
getMonthsin classMonthDayYear- Returns:
- month names enumeration
-
main
-