Class AbstractEpagomenalCalendar
java.lang.Object
net.okapia.osid.primordium.calendaring.framework.spi.AbstractCalendarInfo
net.okapia.osid.primordium.calendaring.framework.spi.AbstractEpagomenalCalendar
- All Implemented Interfaces:
Serializable, CalendarInfo
- Direct Known Subclasses:
ArmenianCalendar, CopticCalendar, EgyptianCalendar, EthiopianCalendar, FrenchRepublicanCalendar, ZoroastrianCalendar
A base for the epagomenal calendars -- the ancient Egyptian and Armenian
"vague year" and the French Republican -- which run twelve months of
thirty days followed by a short thirteenth month of complementary
(epagomenal) days: five in a common year, six in a leap year. The year
numbering is continuous through zero, so the year is zero-based.
A calendar with no leap rule (Egyptian, Armenian) is a fixed 365-day vague year with five epagomenal days. A calendar with a leap rule (French Republican) takes six epagomenal days in a leap year; the rule sits on the year division and the epagomenal month's length rule reads it. The concrete subclass supplies its name, type, and epoch (the Julian Day at the start of its year zero).
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEpagomenalCalendar(LeapingRule leapingRule) Builds the epagomenal tree.protectedAbstractEpagomenalCalendar(LeapingRule leapingRule, DisplayText[] monthNames, DisplayText epagomenalName) Builds the epagomenal tree with named months.protectedAbstractEpagomenalCalendar(LeapingRule leapingRule, DisplayText[] monthNames, DisplayText epagomenalName, DisplayText[] abbrev2, DisplayText[] abbrev3) Builds the epagomenal tree with named and abbreviated months. -
Method Summary
Modifier and TypeMethodDescriptionGets the main (top) division -- the year.booleanTests whether the epoch is a fixed Julian Day.Methods inherited from class AbstractCalendarInfo
getCalendarType, getCycles, getDescription, getEpochAsJulianDay, getEpochRule, getName, isDeterministic, isEpochDerivedModifier and TypeMethodDescriptionGets the calendar type.Gets the free-running cycles (the weekday) that ride alongside the division tree.Gets the calendar description.longGets the fixed epoch Julian Day; valid whenCalendarInfo.isEpochFixed().Gets the epoch derivation rule; valid whenCalendarInfo.isEpochDerived().getName()Gets the calendar name.booleanTests whether rollover and leaping are predictable -- the condition for converting this calendar to another.booleanTests whether the epoch is derived from a rule.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CalendarInfo
getEpochAbbrev, getEpochName, getPreEpochAbbrev, getPreEpochName, isEpochNamed, startsDayAtStartOfClockModifier and TypeMethodDescriptiondefault DisplayTextGets the short form of the name of the time from the epoch onward, as AD abbreviates Anno Domini; valid whenCalendarInfo.isEpochNamed().default DisplayTextGets the name of the time from the epoch onward, as Anno Domini names it in the Gregorian calendar; valid whenCalendarInfo.isEpochNamed().default DisplayTextGets the short form of the name of the time before the first day of the calendar, as BC abbreviates Before Christ; valid whenCalendarInfo.isEpochNamed().default DisplayTextGets the name of the time before the first day of the calendar, as Before Christ names it in the Gregorian calendar; valid whenCalendarInfo.isEpochNamed().default booleanTests whether the calendar names the time on either side of its epoch.default booleanTests whether this calendar's day begins at the start of the clock -- the zero of the time of day (midnight on a 24-hour clock) -- as opposed to an offset reckoning such as sunset (Hebrew, Islamic) or sunrise.
-
Constructor Details
-
AbstractEpagomenalCalendar
Builds the epagomenal tree.- Parameters:
leapingRule- the leap rule, ornullfor a fixed 365-day vague year
-
AbstractEpagomenalCalendar
protected AbstractEpagomenalCalendar(LeapingRule leapingRule, DisplayText[] monthNames, DisplayText epagomenalName) Builds the epagomenal tree with named months.- Parameters:
leapingRule- the leap rule, ornullfor a fixed 365-day vague yearmonthNames- the twelve month names, in orderepagomenalName- the name of the epagomenal thirteenth month
-
AbstractEpagomenalCalendar
protected AbstractEpagomenalCalendar(LeapingRule leapingRule, DisplayText[] monthNames, DisplayText epagomenalName, DisplayText[] abbrev2, DisplayText[] abbrev3) Builds the epagomenal tree with named and abbreviated months.- Parameters:
leapingRule- the leap rule, ornullfor a fixed 365-day vague yearmonthNames- the twelve month names, in orderepagomenalName- the name of the epagomenal thirteenth monthabbrev2- the thirteen two-character abbreviations, the epagomenal month last, ornullwhere the calendar has noneabbrev3- the thirteen three-character abbreviations, likewise
-
-
Method Details
-
getMainDivision
Description copied from interface:CalendarInfoGets the main (top) division -- the year.- Specified by:
getMainDivisionin interfaceCalendarInfo- Overrides:
getMainDivisionin classAbstractCalendarInfo- Returns:
- the main division
-
isEpochFixed
public boolean isEpochFixed()Description copied from interface:CalendarInfoTests whether the epoch is a fixed Julian Day.- Specified by:
isEpochFixedin interfaceCalendarInfo- Overrides:
isEpochFixedin classAbstractCalendarInfo- Returns:
trueif the epoch is fixed
-