OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.CalendarInfo
Description

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.

MethodgetCalendarType
Description

Gets the calendar type.

Returnosid.type.Typethe calendar type
CompliancemandatoryThis method must be implemented.
MethodgetDisplayName
Description

Gets the display name for this calendar.

Returnosid.locale.DisplayTextthe display name
CompliancemandatoryThis method must be implemented.
MethodgetDescription
Description

Gets a description of this calendar.

Returnosid.locale.DisplayTextthe description
CompliancemandatoryThis method must be implemented.
MethodgetCommonEraName
Description

Gets the string for the common era in which years are positive.

Returnosid.locale.DisplayTextthe common era label
CompliancemandatoryThis method must be implemented.
MethodgetCommonEraAbbrev
Description

Gets the abbreviation for the common era in which years are positive.

Returnosid.locale.DisplayTextthe common era label
CompliancemandatoryThis method must be implemented.
MethodgetBeforeCommonEraName
Description

Gets the string for before the common era in which years are negative.

Returnosid.locale.DisplayTextthe before common era label
CompliancemandatoryThis method must be implemented.
MethodgetBeforeCommonEraAbbrev
Description

Gets the abbreviation for before the common era in which years are negative.

Returnosid.locale.DisplayTextthe before common era label
CompliancemandatoryThis method must be implemented.
MethodgetFirstYearInCommonEra
Description

Gets the year number for the first year.

Returnintegerthe first year
CompliancemandatoryThis method must be implemented.
MethodgetLastYearBeforeCommonEra
Description

Gets the year number for the year before the common era.

Returnintegerthe last bce year
CompliancemandatoryThis method must be implemented.
MethodgetYearName
Description

Gets the display name for a calendar "year."

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodgetMonthName
Description

Gets the display name for a calendar "month."

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodhasVariableMonths
Description

Tests if this calendar has a variable number of months in a year.

Returnboolean true if the number of months varies, false if the number of months is constant
CompliancemandatoryThis method must be implemented.
MethodgetNumMonths
Description

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.

Returncardinalthe number of months
CompliancemandatoryThis method must be implemented.
MethodgetNumMonthsForYear
Description

Gets the number of months in the given year.

Parametersintegeryeara year
Returncardinalthe number of months
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra()
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetMonths
Description

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.

Returnosid.locale.CalendarUnit[]the months
CompliancemandatoryThis method must be implemented.
MethodgetMonthsForYear
Description

Gets the months of the year in order of the calendar.

Parametersintegeryeara year
Returnosid.locale.CalendarUnit[]the months
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra()
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetDayName
Description

Gets the display name for a calendar "day."

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodhasVariableDays
Description

Tests if this calendar has a variable number of days in a month.

Returnboolean true if the number of days per month varies, false if the number of days is constant
CompliancemandatoryThis method must be implemented.
MethodgetNumDays
Description

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.

Returncardinalthe number of days
CompliancemandatoryThis method must be implemented.
MethodgetNumDaysForMonth
Description

Gets the number of days in the given month.

Parametersintegeryeara year
cardinalmontha DateTime month code
Returncardinalthe number of days
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra() , or month is greater than getMonthsForYear(year)
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetDays
Description

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.

Returnosid.locale.CalendarUnit[]the days
CompliancemandatoryThis method must be implemented.
MethodgetDaysForMonth
Description

Gets the days of the given month in order of the calendar.

Parametersintegeryeara year
cardinalmontha DateTime month code
Returnosid.locale.CalendarUnit[]the days
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra() , or month is greater than or equal to than getMonthsForYear(year)
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetFirstDayOfYear
Description

Gets the first day of the calendar year.

Returnosid.calendaring.DateTimethe first day of the year
CompliancemandatoryThis method must be implemented.
MethodgetEndOfDaysName
Description

Gets the display name for the end of the calendar.

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodgetOrigin
Description

Gets the start of the "common era" for this calendar.

Returnosid.calendaring.DateTimestart of the calendar
CompliancemandatoryThis method must be implemented.
MethodgetEndOfDays
Description

Gets the end of the world as specified by this calendar.

Returnosid.calendaring.DateTimeend of days
CompliancemandatoryThis method must be implemented.
MethodgetWeekdays
Description

Gets the days of the week in order of the calendar.

Returnosid.locale.CalendarUnit[]the week days
CompliancemandatoryThis method must be implemented.