OSID Logo
OSID Specifications
locale package
Version 3.1.0
Interfaceosid.locale.CalendarConversionSession
Implementsosid.OsidSession
Used Byosid.locale.LocaleManager
osid.locale.LocaleProxyManager
Description

This session defines methods to convert dates across calendar systems.

MethodgetSourceCalendarType
Description

Gets the source calendar type used in this session.

Returnosid.type.Type the source calendar type
Compliancemandatory This method must be implemented.
MethodgetSourceTimeType
Description

Gets the source time type used in this session.

Returnosid.type.Type the source time type
Compliancemandatory This method must be implemented.
MethodgetTargetCalendarType
Description

Gets the target calendar type used in this session.

Returnosid.type.Type the target calendar
Compliancemandatory This method must be implemented.
MethodgetTargetTimeType
Description

Gets the target time type used in this session.

Returnosid.type.Type the target time type
Compliancemandatory This method must be implemented.
MethodcanConvertCalendars
Description

Tests if this user can perform calendar conversions. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if conversion methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodconvertCalendar
Description

Converts a date.

Parametersosid.calendaring.DateTimesourceDate the date to convert
Returnosid.calendaring.DateTime the resulting date
ErrorsINVALID_ARGUMENT sourceDate.getCalendarType()!= getSourceCalendarType() or sourceDate.getTimeType()!= getSourceTimeType()
NULL_ARGUMENT sourceDate is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodconvertCalendars
Description

Converts dates.

Parametersosid.calendaring.DateTimeListsourceDateList the dates to convert
Returnosid.calendaring.DateTimeList the resulting dates
ErrorsINVALID_ARGUMENT sourceDate.getCalendarType()!= getSourceCalendarType() or sourceDate.getTimeType()!= getSourceTimeType()
NULL_ARGUMENT sourceDateList is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.