OSID Logo
OSID Specifications
locale package
Version 3.1.0
Interfaceosid.locale.CalendarInfo
Used Byosid.locale.CalendarInfoSession
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.Type the calendar type
Compliancemandatory This method must be implemented.
MethodgetDisplayName
Description

Gets the display name for this calendar.

Returnosid.locale.DisplayText the display name
Compliancemandatory This method must be implemented.
MethodgetDescription
Description

Gets a description of this calendar.

Returnosid.locale.DisplayText the description
Compliancemandatory This method must be implemented.
MethodgetCommonEraName
Description

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

Returnosid.locale.DisplayText the common era label
Compliancemandatory This method must be implemented.
MethodgetCommonEraAbbrev
Description

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

Returnosid.locale.DisplayText the common era label
Compliancemandatory This method must be implemented.
MethodgetBeforeCommonEraName
Description

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

Returnosid.locale.DisplayText the before common era label
Compliancemandatory This method must be implemented.
MethodgetBeforeCommonEraAbbrev
Description

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

Returnosid.locale.DisplayText the before common era label
Compliancemandatory This method must be implemented.
MethodgetFirstYearInCommonEra
Description

Gets the year number for the first year.

Returninteger the first year
Compliancemandatory This method must be implemented.
MethodgetLastYearBeforeCommonEra
Description

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

Returninteger the last bce year
Compliancemandatory This method must be implemented.
MethodgetYearName
Description

Gets the display name for a calendar "year."

Returnosid.locale.DisplayText the name
Compliancemandatory This method must be implemented.
MethodgetMonthName
Description

Gets the display name for a calendar "month."

Returnosid.locale.DisplayText the name
Compliancemandatory This 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
Compliancemandatory This 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.

Returncardinal the number of months
Compliancemandatory This method must be implemented.
MethodgetNumMonthsForYear
Description

Gets the number of months in the given year.

Parametersintegeryear a year
Returncardinal the number of months
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra()
OPERATION_FAILED unable to complete request
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethodgetMonthsForYear
Description

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

Parametersintegeryear a year
Returnosid.locale.CalendarUnit[] the months
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra()
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetDayName
Description

Gets the display name for a calendar "day."

Returnosid.locale.DisplayText the name
Compliancemandatory This 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
Compliancemandatory This 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.

Returncardinal the number of days
Compliancemandatory This method must be implemented.
MethodgetNumDaysForMonth
Description

Gets the number of days in the given month.

Parametersintegeryear a year
cardinalmonth a DateTime month code
Returncardinal the number of days
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra(), or month is greater than getMonthsForYear(year)
OPERATION_FAILED unable to complete request
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethodgetDaysForMonth
Description

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

Parametersintegeryear a year
cardinalmonth a 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_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetFirstDayOfYear
Description

Gets the first day of the calendar year.

Returnosid.calendaring.DateTime the first day of the year
Compliancemandatory This method must be implemented.
MethodgetEndOfDaysName
Description

Gets the display name for the end of the calendar.

Returnosid.locale.DisplayText the name
Compliancemandatory This method must be implemented.
MethodgetOrigin
Description

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

Returnosid.calendaring.DateTime start of the calendar
Compliancemandatory This method must be implemented.
MethodgetEndOfDays
Description

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

Returnosid.calendaring.DateTime end of days
Compliancemandatory This method must be implemented.
MethodgetWeekdays
Description

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

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