Interface | osid.locale.CalendarFormattingSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session defines methods to format and parse date times of the calendar and time type defined. | ||
Method | getCalendarType | ||
Description |
Gets the calendar type for the datetimes used in this session. | ||
Return | osid.type.Type | the calendar type | |
Compliance | mandatory | This method must be implemented. | |
Method | getTimeType | ||
Description |
Gets the time type for the times used in this session. | ||
Return | osid.type.Type | the time type | |
Compliance | mandatory | This method must be implemented. | |
Method | getDateFormatType | ||
Description |
Gets the date format type used in this session. | ||
Return | osid.type.Type | the target language | |
Compliance | mandatory | This method must be implemented. | |
Method | getTimeFormatType | ||
Description |
Gets the time format type used in this session. | ||
Return | osid.type.Type | the target script | |
Compliance | mandatory | This method must be implemented. | |
Method | canDisplayPrimitives | ||
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 | ||
Return | boolean | false if translation methods are not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | datetimeToString | ||
Description |
Gets a string representation of a datetime. | ||
Parameters | osid.calendaring.DateTime | datetime | a datetime value |
Return | string | the display string | |
Errors | INVALID_ARGUMENT | datetime.getCalendarType() != getCalendarType() or
datetime.getTimeType() != getTimeType() | |
NULL_ARGUMENT | datetime is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | datetimesToStrings | ||
Description |
Gets a string representation of a list of datetimes. | ||
Parameters | osid.calendaring.DateTimeList | datetimes | a datetime value list |
Return | string[] | the display strings | |
Errors | INVALID_ARGUMENT | datetime.getCalendarType() != getCalendarType() or
datetime.getTimeType() != getTimeType() | |
NULL_ARGUMENT | datetimes is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | stringToDateTime | ||
Description |
Parses a date time string. | ||
Parameters | string | s | a datetime string |
Return | osid.calendaring.DateTime | the date time value | |
Errors | INVALID_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 | ||
Compliance | mandatory | This method must be implemented. | |
Method | timeToString | ||
Description |
Gets a string representation of a time. | ||
Parameters | osid.calendaring.Time | time | a time value |
Return | string | the display string | |
Errors | INVALID_ARGUMENT | time.getTimeType() != getTimeType() | |
NULL_ARGUMENT | time is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | timesToStrings | ||
Description |
Gets a string representation of a list of times. | ||
Parameters | osid.calendaring.TimeList | times | a time value list |
Return | string[] | the display strings | |
Errors | INVALID_ARGUMENT | time.getTimeType() != getTimeType() | |
NULL_ARGUMENT | times is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | stringToTime | ||
Description |
Parses a time string. | ||
Parameters | string | s | a time string |
Return | osid.calendaring.Time | the time value | |
Errors | INVALID_ARGUMENT | s is not of getTimeFormatType() | |
NULL_ARGUMENT | s is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | durationToString | ||
Description |
Gets a string representation of a duration. | ||
Parameters | osid.calendaring.Duration | duration | a duration value |
Return | string | the display string | |
Errors | INVALID_ARGUMENT | duration.getCalendarType() != getCalendarType()
or duration.getTimeType() != getTimeType() | |
NULL_ARGUMENT | duration is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | durationsToStrings | ||
Description |
Gets a string representation of a list of durations. | ||
Parameters | osid.calendaring.DurationList | durations | a duration value list |
Return | string[] | the display strings | |
Errors | INVALID_ARGUMENT | duration.getCalendarType() != getCalendarType()
or duration.getTimeType() != getTimeType() | |
NULL_ARGUMENT | durations is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | stringToDuration | ||
Description |
Parses a duration string. | ||
Parameters | string | s | a duration string |
Return | osid.calendaring.Duration | the duration value | |
Errors | INVALID_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 | ||
Compliance | mandatory | This method must be implemented. |