OSID Logo
OSID Specifications
locale package
Version 3.1.0
Interfaceosid.locale.CalendarFormattingSession
Implementsosid.OsidSession
Used Byosid.locale.LocaleManager
osid.locale.LocaleProxyManager
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.Type the calendar type
Compliancemandatory This method must be implemented.
MethodgetTimeType
Description

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

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

Gets the date format type used in this session.

Returnosid.type.Type the target language
Compliancemandatory This method must be implemented.
MethodgetTimeFormatType
Description

Gets the time format type used in this session.

Returnosid.type.Type the target script
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddatetimeToString
Description

Gets a string representation of a datetime.

Parametersosid.calendaring.DateTimedatetime a datetime value
Returnstring the display string
ErrorsINVALID_ARGUMENT datetime.getCalendarType()!= getCalendarType() or datetime.getTimeType()!= getTimeType()
NULL_ARGUMENT datetime is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddatetimesToStrings
Description

Gets a string representation of a list of datetimes.

Parametersosid.calendaring.DateTimeListdatetimes a datetime value list
Returnstring[] the display strings
ErrorsINVALID_ARGUMENT datetime.getCalendarType()!= getCalendarType() or datetime.getTimeType()!= getTimeType()
NULL_ARGUMENT datetimes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodstringToDateTime
Description

Parses a date time string.

Parametersstrings a datetime string
Returnosid.calendaring.DateTime the date time value
ErrorsINVALID_ARGUMENT s is not of getDateFormatType() or s is not of getTimeFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodtimeToString
Description

Gets a string representation of a time.

Parametersosid.calendaring.Timetime a time value
Returnstring the display string
ErrorsINVALID_ARGUMENT time.getTimeType()!= getTimeType()
NULL_ARGUMENT time is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodtimesToStrings
Description

Gets a string representation of a list of times.

Parametersosid.calendaring.TimeListtimes a time value list
Returnstring[] the display strings
ErrorsINVALID_ARGUMENT time.getTimeType()!= getTimeType()
NULL_ARGUMENT times is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodstringToTime
Description

Parses a time string.

Parametersstrings a time string
Returnosid.calendaring.Time the time value
ErrorsINVALID_ARGUMENT s is not of getTimeFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddurationToString
Description

Gets a string representation of a duration.

Parametersosid.calendaring.Durationduration a duration value
Returnstring the display string
ErrorsINVALID_ARGUMENT duration.getCalendarType()!= getCalendarType() or duration.getTimeType()!= getTimeType()
NULL_ARGUMENT duration is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddurationsToStrings
Description

Gets a string representation of a list of durations.

Parametersosid.calendaring.DurationListdurations a duration value list
Returnstring[] the display strings
ErrorsINVALID_ARGUMENT duration.getCalendarType()!= getCalendarType() or duration.getTimeType()!= getTimeType()
NULL_ARGUMENT durations is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodstringToDuration
Description

Parses a duration string.

Parametersstrings a duration string
Returnosid.calendaring.Duration the duration value
ErrorsINVALID_ARGUMENT s is not of getDateFormatType() or s is not of getTimeFormatType()
NULL_ARGUMENT s is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.