public interface CalendarInfo
This interface defines methods to examine a calendar. A calendar is organized into "years," "months," and "days." A calendar system may offer a diffreent designation for these divisions which may or may not vary in duration.
Modifier and Type | Method and Description |
---|---|
DisplayText |
getBeforeCommonEraAbbrev()
Gets the abbreviation for before the common era in which years are
negative.
|
DisplayText |
getBeforeCommonEraName()
Gets the string for before the common era in which years are negative.
|
Type |
getCalendarType()
Gets the calendar type.
|
DisplayText |
getCommonEraAbbrev()
Gets the abbreviation for the common era in which years are positive.
|
DisplayText |
getCommonEraName()
Gets the string for the common era in which years are positive.
|
DisplayText |
getDayName()
Gets the display name for a calendar "day."
|
CalendarUnit[] |
getDays()
Gets the days of the month in order of the calendar.
|
CalendarUnit[] |
getDaysForMonth(long year,
long month)
Gets the days of the given month in order of the calendar.
|
DisplayText |
getDescription()
Gets a description of this calendar.
|
DisplayText |
getDisplayName()
Gets the display name for this calendar.
|
DateTime |
getEndOfDays()
Gets the end of the world as specified by this calendar.
|
DisplayText |
getEndOfDaysName()
Gets the display name for the end of the calendar.
|
DateTime |
getFirstDayOfYear()
Gets the first day of the calendar year.
|
long |
getFirstYearInCommonEra()
Gets the year number for the first year.
|
long |
getLastYearBeforeCommonEra()
Gets the year number for the year before the common era.
|
DisplayText |
getMonthName()
Gets the display name for a calendar "month."
|
CalendarUnit[] |
getMonths()
Gets the months of the year in order of the calendar.
|
CalendarUnit[] |
getMonthsForYear(long year)
Gets the months of the year in order of the calendar.
|
long |
getNumDays()
Gets the number of days in a year.
|
long |
getNumDaysForMonth(long year,
long month)
Gets the number of days in the given month.
|
long |
getNumMonths()
Gets the number of months of the year.
|
long |
getNumMonthsForYear(long year)
Gets the number of months in the given year.
|
DateTime |
getOrigin()
Gets the start of the "common era" for this calendar.
|
CalendarUnit[] |
getWeekdays()
Gets the days of the week in order of the calendar.
|
DisplayText |
getYearName()
Gets the display name for a calendar "year."
|
boolean |
hasVariableDays()
Tests if this calendar has a variable number of days in a month.
|
boolean |
hasVariableMonths()
Tests if this calendar has a variable number of months in a year.
|
Type getCalendarType()
mandatory
- This method must be implemented. DisplayText getDisplayName()
mandatory
- This method must be implemented. DisplayText getDescription()
mandatory
- This method must be implemented. DisplayText getCommonEraName()
mandatory
- This method must be implemented. DisplayText getCommonEraAbbrev()
mandatory
- This method must be implemented. DisplayText getBeforeCommonEraName()
mandatory
- This method must be implemented. DisplayText getBeforeCommonEraAbbrev()
mandatory
- This method must be implemented. long getFirstYearInCommonEra()
mandatory
- This method must be implemented. long getLastYearBeforeCommonEra()
mandatory
- This method must be implemented. DisplayText getYearName()
mandatory
- This method must be implemented. DisplayText getMonthName()
mandatory
- This method must be implemented. boolean hasVariableMonths()
true
if the number of months varies,
false
if the number of months is constantmandatory
- This method must be implemented. long getNumMonths()
mandatory
- This method must be implemented. long getNumMonthsForYear(long year) throws OperationFailedException
year
- a yearIllegalStateException
- year
is greater
than getLastYearBeforeCommonEra()
and less then
getFirstYearInCommonEra()
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. CalendarUnit[] getMonths()
mandatory
- This method must be implemented. CalendarUnit[] getMonthsForYear(long year) throws OperationFailedException
year
- a yearIllegalStateException
- year
is greater
than getLastYearBeforeCommonEra()
and less then
getFirstYearInCommonEra()
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. DisplayText getDayName()
mandatory
- This method must be implemented. boolean hasVariableDays()
true
if the number of days per month varies,
false
if the number of days is constantmandatory
- This method must be implemented. long getNumDays()
mandatory
- This method must be implemented. long getNumDaysForMonth(long year, long month) throws OperationFailedException
year
- a yearmonth
- a DateTime
month codeIllegalStateException
- year
is greater
than getLastYearBeforeCommonEra()
and less then
getFirstYearInCommonEra()
, or month
is greater than getMonthsForYear(year)
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. CalendarUnit[] getDays()
mandatory
- This method must be implemented. CalendarUnit[] getDaysForMonth(long year, long month) throws OperationFailedException
year
- a yearmonth
- a DateTime
month codeIllegalStateException
- year
is greater
than getLastYearBeforeCommonEra()
and less then
getFirstYearInCommonEra()
, or month
is greater than or equal to than
getMonthsForYear(year)
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. DateTime getFirstDayOfYear()
mandatory
- This method must be implemented. DisplayText getEndOfDaysName()
mandatory
- This method must be implemented. DateTime getOrigin()
mandatory
- This method must be implemented. DateTime getEndOfDays()
mandatory
- This method must be implemented. CalendarUnit[] getWeekdays()
mandatory
- This method must be implemented.