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

This session defines methods to format and parse date times of the calendar and time type defined.

MethodgetCalendarType
Description

Gets the calendar type for the datetimes used in this session.

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

Gets the time type for the times used in this session.

Returnosid.type.Typethe time type
CompliancemandatoryThis method must be implemented.
MethodgetDateFormatType
Description

Gets the date format type used in this session.

Returnosid.type.Typethe target language
CompliancemandatoryThis method must be implemented.
MethodgetTimeFormatType
Description

Gets the time format type used in this session.

Returnosid.type.Typethe target script
CompliancemandatoryThis method must be implemented.
MethodcanDisplayPrimitives
Description

Tests if this user can format and parse date times. 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 translation methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddatetimeToString
Description

Gets a string representation of a datetime.

Parametersosid.calendaring.DateTimedatetimea datetime value
Returnstringthe display string
ErrorsINVALID_ARGUMENT datetime.getCalendarType() != getCalendarType() or datetime.getTimeType() != getTimeType()
NULL_ARGUMENT datetime is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddatetimesToStrings
Description

Gets a string representation of a list of datetimes.

Parametersosid.calendaring.DateTimeListdatetimesa datetime value list
Returnstring[]the display strings
ErrorsINVALID_ARGUMENT datetime.getCalendarType() != getCalendarType() or datetime.getTimeType() != getTimeType()
NULL_ARGUMENT datetimes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodstringToDateTime
Description

Parses a date time string.

Parametersstringsa datetime string
Returnosid.calendaring.DateTimethe date time value
ErrorsINVALID_ARGUMENT s is not of getDateFormatType() or s is not of getTimeFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodtimeToString
Description

Gets a string representation of a time.

Parametersosid.calendaring.Timetimea time value
Returnstringthe display string
ErrorsINVALID_ARGUMENT time.getTimeType() != getTimeType()
NULL_ARGUMENT time is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodtimesToStrings
Description

Gets a string representation of a list of times.

Parametersosid.calendaring.TimeListtimesa time value list
Returnstring[]the display strings
ErrorsINVALID_ARGUMENT time.getTimeType() != getTimeType()
NULL_ARGUMENT times is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodstringToTime
Description

Parses a time string.

Parametersstringsa time string
Returnosid.calendaring.Timethe time value
ErrorsINVALID_ARGUMENT s is not of getTimeFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddurationToString
Description

Gets a string representation of a duration.

Parametersosid.calendaring.Durationdurationa duration value
Returnstringthe display string
ErrorsINVALID_ARGUMENT duration.getCalendarType() != getCalendarType() or duration.getTimeType() != getTimeType()
NULL_ARGUMENT duration is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddurationsToStrings
Description

Gets a string representation of a list of durations.

Parametersosid.calendaring.DurationListdurationsa duration value list
Returnstring[]the display strings
ErrorsINVALID_ARGUMENT duration.getCalendarType() != getCalendarType() or duration.getTimeType() != getTimeType()
NULL_ARGUMENT durations is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodstringToDuration
Description

Parses a duration string.

Parametersstringsa duration string
Returnosid.calendaring.Durationthe duration value
ErrorsINVALID_ARGUMENT s is not of getDateFormatType() or s is not of getTimeFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.