OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.CalendarConversionSession
Implementsosid.OsidSession
Description

This session defines methods to convert dates across calendar systems.

MethodgetSourceCalendarType
Description

Gets the source calendar type used in this session.

Returnosid.type.Typethe source calendar type
CompliancemandatoryThis method must be implemented.
MethodgetSourceTimeType
Description

Gets the source time type used in this session.

Returnosid.type.Typethe source time type
CompliancemandatoryThis method must be implemented.
MethodgetTargetCalendarType
Description

Gets the target calendar type used in this session.

Returnosid.type.Typethe target calendar
CompliancemandatoryThis method must be implemented.
MethodgetTargetTimeType
Description

Gets the target time type used in this session.

Returnosid.type.Typethe target time type
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodconvertCalendar
Description

Converts a date.

Parametersosid.calendaring.DateTimesourceDatethe date to convert
Returnosid.calendaring.DateTimethe resulting date
ErrorsINVALID_ARGUMENT sourceDate.getCalendarType() != getSourceCalendarType() or sourceDate.getTimeType() != getSourceTimeType()
NULL_ARGUMENT sourceDate is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodconvertCalendars
Description

Converts dates.

Parametersosid.calendaring.DateTimeListsourceDateListthe dates to convert
Returnosid.calendaring.DateTimeListthe resulting dates
ErrorsINVALID_ARGUMENT sourceDate.getCalendarType() != getSourceCalendarType() or sourceDate.getTimeType() != getSourceTimeType()
NULL_ARGUMENT sourceDateList is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.