OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.TimeInfo
Description

This interface defines methods to examine a time. Time is organized intro "hours," "minutes," and "seconds." A time system may offer a different designation for these divisions which may or may not vary in duration.

MethodgetTimeType
Description

Gets the time type.

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

Gets the display name for this time system.

Returnosid.locale.DisplayTextthe display name
CompliancemandatoryThis method must be implemented.
MethodgetDisplayLabel
Description

Gets a short label for this time system.

Returnosid.locale.DisplayTextthe label
CompliancemandatoryThis method must be implemented.
MethodgetDescription
Description

Gets a description of this time system.

Returnosid.locale.DisplayTextthe description
CompliancemandatoryThis method must be implemented.
MethodgetHourName
Description

Gets the display name for "hours."

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodgetHourAbbrev
Description

Gets the abbreviation for "hours."

Returnosid.locale.DisplayTextthe abbreviation
CompliancemandatoryThis method must be implemented.
MethodgetHourInitial
Description

Gets the initial for "hours."

Returnosid.locale.DisplayTextthe initial
CompliancemandatoryThis method must be implemented.
MethodhasVariableHours
Description

Tests if this time system has a variable number of hours in a day.

Returnboolean true if the number of hours per day varies, false if the number of hours per day is constant
CompliancemandatoryThis method must be implemented.
MethodgetNumHours
Description

Gets the number of hours in a day. For a variable hour time system, the number of hours defined is returned. If there are no "hours" in this time system then this value may be zero.

Returncardinalthe number of hours
CompliancemandatoryThis method must be implemented.
MethodgetNumHoursForDay
Description

Gets the number of hours for a given day.

Parametersintegeryeara year
cardinalmontha DateTime month code
cardinaldaya DateTime day code
Returncardinalthe number of hours
ErrorsILLEGAL_STATE year is greater than CalendarInfo.getLastYearBeforeCommonEra() and less then CalendarInfo.getFirstYearInCommonEra() , or month is greater than or equal to CalendarInfo.getNumMonthsForYear(year) , or day is greater than or equal to CalendarInfo.getDaysInMonth(year, month)
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetMinuteName
Description

Gets the display name for "minutes."

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodgetMinuteAbbrev
Description

Gets the abbreviation for "minutes."

Returnosid.locale.DisplayTextthe abbreviation
CompliancemandatoryThis method must be implemented.
MethodgetMinuteInitial
Description

Gets the initial for "minutes."

Returnosid.locale.DisplayTextthe initial
CompliancemandatoryThis method must be implemented.
MethodhasVariableMinutes
Description

Tests if this time system has a variable number of minutes in an hour.

Returnboolean true if the number of minutes per hour varies, false if the number of minutes per hour is constant
CompliancemandatoryThis method must be implemented.
MethodgetNumMinutes
Description

Gets the number of minutes in an hour. For a variable minute time system, the number of minutes defined is returned. If there are no "minutes" in this time system then this value may be zero. If there are no "hours" defined then the number of minutes is the number of minutes in a day.

Returncardinalthe number of minutes
CompliancemandatoryThis method must be implemented.
MethodgetNumMinutesForHour
Description

Gets the minutes for a given hour.

Parametersintegeryeara year
cardinalmontha DateTime month code
cardinaldaya DateTime day code
cardinalhouran hour
Returncardinalthe number of minutes
ErrorsILLEGAL_STATE year is greater than CalendarInfo.getLastYearBeforeCommonEra() and less then CalendarInfo.getFirstYearInCommonEra(), or month is greater than or equal to CalendarInfo.getNumMonthsForYear(year) , or day is greater than or equal to CalendarInfo.getDaysInMonth(year, month) , or hour is greater than or equal to getNumHoursInDay(year, month, day)
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetSecondName
Description

Gets the display name for "seconds."

Returnosid.locale.DisplayTextthe name
CompliancemandatoryThis method must be implemented.
MethodgetSecondAbbrev
Description

Gets the abbreviation for "seconds."

Returnosid.locale.DisplayTextthe abbreviation
CompliancemandatoryThis method must be implemented.
MethodgetSecondInitial
Description

Gets the initial for "seconds."

Returnosid.locale.DisplayTextthe initial
CompliancemandatoryThis method must be implemented.
MethodhasVariableSeconds
Description

Tests if this time system has a variable number of seconds in a minute.

Returnboolean true if the number of seconds per minute varies, false if the number of seconds per minute is constant
CompliancemandatoryThis method must be implemented.
MethodgetNumSeconds
Description

Gets the number of seconds in a minute. For a variable second time system, the number of seconds defined is returned. If there are no "seconds" in this time system then this value may be zero. If there are no "minutes" defined then the number of seconds is the number of seconds in an hour.

Returncardinalthe number of seconds
CompliancemandatoryThis method must be implemented.
MethodgetNumSecondsForMinute
Description

Gets the seconds for a given minute.

Parametersintegeryeara year
cardinalmontha DateTime month code
cardinaldaya DateTime day code
cardinalhouran hour
cardinalminutea minute
Returncardinalthe number of seconds
ErrorsILLEGAL_STATE year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra() , or month is greater than or equal to CalendarInfo.getNumMonthsForYear(year) , or day is greater than or equal to CalendarInfo.getDaysInMonth(year, month) , or hour is greater than or equal to getNumHoursInDay(year, month, day) , or minute is greater than or equal to getNumMinutesInhour(year, month, day, hour)
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.