Class EthiopicCalendar
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.GregorianCalendar
org.episteme.social.history.calendars.JulianCalendar
org.episteme.social.history.calendars.CopticCalendar
org.episteme.social.history.calendars.EthiopicCalendar
- All Implemented Interfaces:
Serializable
Implementation of the Ethiopian calendar.
The Ethiopian calendar is based on the Coptic calendar and is the official
calendar of Ethiopia. It has 13 months - 12 of 30 days and one of 5-6 days.
Key features:
- Epoch: August 29, 8 CE (Julian)
- 13 months: 12 months of 30 days + Paguemen (5 or 6 days)
- 7-8 years behind the Gregorian calendar
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longThe RD number of the Ethiopian epoch (August 29, 8 CE Julian).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
ConstructorsConstructorDescriptionCreates a new EthiopicCalendar object.EthiopicCalendar(int i, int j, int k) Creates a new EthiopicCalendar object.EthiopicCalendar(long l) Creates a new EthiopicCalendar object.EthiopicCalendar(AlternateCalendar altcalendar) Creates a new EthiopicCalendar object. -
Method Summary
Modifier and TypeMethodDescriptionReturns an enumeration of all Ethiopian month names.static voidMain method for testing the Ethiopian calendar implementation.protected StringReturns the name of the current month.protected voidRecomputes the month, day, and year from the current Rata Die number.protected voidRecomputes the Rata Die number from the current month, day, and year.Methods inherited from class CopticCalendar
getSuffix, isLeapYear, toStringMethods inherited from class JulianCalendar
setMethods inherited from class GregorianCalendar
dayNumber, daysLeftMethods inherited from class MonthDayYear
getDay, getMonth, getYear, setMethods 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
public static long EPOCHThe RD number of the Ethiopian epoch (August 29, 8 CE Julian).
-
-
Constructor Details
-
EthiopicCalendar
public EthiopicCalendar()Creates a new EthiopicCalendar object. -
EthiopicCalendar
public EthiopicCalendar(long l) Creates a new EthiopicCalendar object.- Parameters:
l- the Rata Die number.
-
EthiopicCalendar
Creates a new EthiopicCalendar object.- Parameters:
altcalendar- another calendar to initialize from.
-
EthiopicCalendar
public EthiopicCalendar(int i, int j, int k) Creates a new EthiopicCalendar object.- Parameters:
i- the month (1-13).j- the day.k- the year.
-
-
Method Details
-
recomputeRD
protected void recomputeRD()Recomputes the Rata Die number from the current month, day, and year.- Overrides:
recomputeRDin classCopticCalendar
-
recomputeFromRD
protected void recomputeFromRD()Recomputes the month, day, and year from the current Rata Die number.- Overrides:
recomputeFromRDin classCopticCalendar
-
monthName
Returns the name of the current month.- Overrides:
monthNamein classCopticCalendar- Returns:
- the month name string.
-
getMonths
Returns an enumeration of all Ethiopian month names.- Overrides:
getMonthsin classCopticCalendar- Returns:
- enumeration of month names.
-
main
Main method for testing the Ethiopian calendar implementation.- Parameters:
args- command line arguments.
-