Interface CalendarInfo
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.
-
Method Summary
Modifier and TypeMethodDescriptionGets the abbreviation for before the common era in which years are negative.Gets the string for before the common era in which years are negative.Gets the calendar type.Gets the abbreviation for the common era in which years are positive.Gets the string for the common era in which years are positive.Gets the display name for a calendar "day."getDays()Gets the days of the month in order of the calendar.getDaysForMonth(long year, long month) Gets the days of the given month in order of the calendar.Gets a description of this calendar.Gets the display name for this calendar.Gets the end of the world as specified by this calendar.Gets the display name for the end of the calendar.Gets the first day of the calendar year.longGets the year number for the first year.longGets the year number for the year before the common era.Gets the display name for a calendar "month."Gets the months of the year in order of the calendar.getMonthsForYear(long year) Gets the months of the year in order of the calendar.longGets the number of days in a year.longgetNumDaysForMonth(long year, long month) Gets the number of days in the given month.longGets the number of months of the year.longgetNumMonthsForYear(long year) Gets the number of months in the given year.Gets the start of the "common era" for this calendar.Gets the days of the week in order of the calendar.Gets the display name for a calendar "year."booleanTests if this calendar has a variable number of days in a month.booleanTests if this calendar has a variable number of months in a year.
-
Method Details
-
getCalendarType
Type getCalendarType()Gets the calendar type.- Returns:
- the calendar type
- Compliance:
mandatory- This method must be implemented.
-
getDisplayName
DisplayText getDisplayName()Gets the display name for this calendar.- Returns:
- the display name
- Compliance:
mandatory- This method must be implemented.
-
getDescription
DisplayText getDescription()Gets a description of this calendar.- Returns:
- the description
- Compliance:
mandatory- This method must be implemented.
-
getCommonEraName
DisplayText getCommonEraName()Gets the string for the common era in which years are positive.- Returns:
- the common era label
- Compliance:
mandatory- This method must be implemented.
-
getCommonEraAbbrev
DisplayText getCommonEraAbbrev()Gets the abbreviation for the common era in which years are positive.- Returns:
- the common era label
- Compliance:
mandatory- This method must be implemented.
-
getBeforeCommonEraName
DisplayText getBeforeCommonEraName()Gets the string for before the common era in which years are negative.- Returns:
- the before common era label
- Compliance:
mandatory- This method must be implemented.
-
getBeforeCommonEraAbbrev
DisplayText getBeforeCommonEraAbbrev()Gets the abbreviation for before the common era in which years are negative.- Returns:
- the before common era label
- Compliance:
mandatory- This method must be implemented.
-
getFirstYearInCommonEra
long getFirstYearInCommonEra()Gets the year number for the first year.- Returns:
- the first year
- Compliance:
mandatory- This method must be implemented.
-
getLastYearBeforeCommonEra
long getLastYearBeforeCommonEra()Gets the year number for the year before the common era.- Returns:
- the last bce year
- Compliance:
mandatory- This method must be implemented.
-
getYearName
DisplayText getYearName()Gets the display name for a calendar "year."- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
getMonthName
DisplayText getMonthName()Gets the display name for a calendar "month."- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
hasVariableMonths
boolean hasVariableMonths()Tests if this calendar has a variable number of months in a year.- Returns:
trueif the number of months varies,falseif the number of months is constant- Compliance:
mandatory- This method must be implemented.
-
getNumMonths
long getNumMonths()Gets the number of months of the year. For a variable month calendar, the number of all defined months are returned. If there are no "months" in this calendar system then this value may be zero.- Returns:
- the number of months
- Compliance:
mandatory- This method must be implemented.
-
getNumMonthsForYear
Gets the number of months in the given year.- Parameters:
year- a year- Returns:
- the number of months
- Throws:
IllegalStateException-yearis greater thangetLastYearBeforeCommonEra()and less thengetFirstYearInCommonEra()OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getMonths
CalendarUnit[] getMonths()Gets the months of the year in order of the calendar. For a variable month calendar, all defined months are returned. If there are no "months" in this calendar system then the list may be empty.- Returns:
- the months
- Compliance:
mandatory- This method must be implemented.
-
getMonthsForYear
Gets the months of the year in order of the calendar.- Parameters:
year- a year- Returns:
- the months
- Throws:
IllegalStateException-yearis greater thangetLastYearBeforeCommonEra()and less thengetFirstYearInCommonEra()OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getDayName
DisplayText getDayName()Gets the display name for a calendar "day."- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
hasVariableDays
boolean hasVariableDays()Tests if this calendar has a variable number of days in a month.- Returns:
trueif the number of days per month varies,falseif the number of days is constant- Compliance:
mandatory- This method must be implemented.
-
getNumDays
long getNumDays()Gets the number of days in a year. For a variable day calendar, the number of all defined days are returned. If there are no "days" in this calendar system then this value may be zero. If there are no "months" defined then the number of days is the number of days in a year.- Returns:
- the number of days
- Compliance:
mandatory- This method must be implemented.
-
getNumDaysForMonth
Gets the number of days in the given month.- Parameters:
year- a yearmonth- aDateTimemonth code- Returns:
- the number of days
- Throws:
IllegalStateException-yearis greater thangetLastYearBeforeCommonEra()and less thengetFirstYearInCommonEra(), ormonthis greater thangetMonthsForYear(year)OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getDays
CalendarUnit[] getDays()Gets the days of the month in order of the calendar. For a variable day calendar, all defined days are returned. If there are no "days" in this time system then this value may be zero. If there are no "months" defined then the number of days applies to the entire year.- Returns:
- the days
- Compliance:
mandatory- This method must be implemented.
-
getDaysForMonth
Gets the days of the given month in order of the calendar.- Parameters:
year- a yearmonth- aDateTimemonth code- Returns:
- the days
- Throws:
IllegalStateException-yearis greater thangetLastYearBeforeCommonEra()and less thengetFirstYearInCommonEra(), ormonthis greater than or equal to thangetMonthsForYear(year)OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getFirstDayOfYear
DateTime getFirstDayOfYear()Gets the first day of the calendar year.- Returns:
- the first day of the year
- Compliance:
mandatory- This method must be implemented.
-
getEndOfDaysName
DisplayText getEndOfDaysName()Gets the display name for the end of the calendar.- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
getOrigin
DateTime getOrigin()Gets the start of the "common era" for this calendar.- Returns:
- start of the calendar
- Compliance:
mandatory- This method must be implemented.
-
getEndOfDays
DateTime getEndOfDays()Gets the end of the world as specified by this calendar.- Returns:
- end of days
- Compliance:
mandatory- This method must be implemented.
-
getWeekdays
CalendarUnit[] getWeekdays()Gets the days of the week in order of the calendar.- Returns:
- the week days
- Compliance:
mandatory- This method must be implemented.
-