Class AbstractDayCountCalendar
java.lang.Object
net.okapia.osid.primordium.calendaring.framework.spi.AbstractCalendarInfo
net.okapia.osid.primordium.calendaring.framework.spi.AbstractDayCountCalendar
- All Implemented Interfaces:
Serializable, CalendarInfo
- Direct Known Subclasses:
AnsiDateCalendar, DublinJulianDayCalendar, JulianDayCalendar, LilianCalendar, MayaLongCountCalendar, ModifiedJulianDayCalendar, RataDieCalendar, ReducedJulianDayCalendar, TruncatedJulianDayCalendar, UnixCalendar
A base for the day-count calendars -- Julian Day, Unix, Rata Die, and the
rest -- each of which is a single unbounded count of days from a fixed
epoch, with nothing below it. There are no months, no weeks, and no leap:
the calendar is one zero-based
DAY division, so isDayCount is true and a date is just the count. The concrete subclass
supplies its name, type, and epoch.- See Also:
-
Constructor Summary
Constructors -
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
-
AbstractDayCountCalendar
public AbstractDayCountCalendar()Constructs a newAbstractDayCountCalendar.
-
-
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
-