Interface TimeInfo
public interface TimeInfo
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.
-
Method Summary
Modifier and TypeMethodDescriptionGets a description of this time system.Gets a short label for this time system.Gets the display name for this time system.Gets the abbreviation for "hours."Gets the initial for "hours."Gets the display name for "hours."Gets the abbreviation for "minutes."Gets the initial for "minutes."Gets the display name for "minutes."longGets the number of hours in a day.longgetNumHoursForDay(long year, long month, long day) Gets the number of hours for a given day.longGets the number of minutes in an hour.longgetNumMinutesForHour(long year, long month, long day, long hour) Gets the minutes for a given hour.longGets the number of seconds in a minute.longgetNumSecondsForMinute(long year, long month, long day, long hour, long minute) Gets the seconds for a given minute.Gets the abbreviation for "seconds."Gets the initial for "seconds."Gets the display name for "seconds."Gets the time type.booleanTests if this time system has a variable number of hours in a day.booleanTests if this time system has a variable number of minutes in an hour.booleanTests if this time system has a variable number of seconds in a minute.
-
Method Details
-
getTimeType
Type getTimeType()Gets the time type.- Returns:
- the time type
- Compliance:
mandatory- This method must be implemented.
-
getDisplayName
DisplayText getDisplayName()Gets the display name for this time system.- Returns:
- the display name
- Compliance:
mandatory- This method must be implemented.
-
getDisplayLabel
DisplayText getDisplayLabel()Gets a short label for this time system.- Returns:
- the label
- Compliance:
mandatory- This method must be implemented.
-
getDescription
DisplayText getDescription()Gets a description of this time system.- Returns:
- the description
- Compliance:
mandatory- This method must be implemented.
-
getHourName
DisplayText getHourName()Gets the display name for "hours."- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
getHourAbbrev
DisplayText getHourAbbrev()Gets the abbreviation for "hours."- Returns:
- the abbreviation
- Compliance:
mandatory- This method must be implemented.
-
getHourInitial
DisplayText getHourInitial()Gets the initial for "hours."- Returns:
- the initial
- Compliance:
mandatory- This method must be implemented.
-
hasVariableHours
boolean hasVariableHours()Tests if this time system has a variable number of hours in a day.- Returns:
trueif the number of hours per day varies,falseif the number of hours per day is constant- Compliance:
mandatory- This method must be implemented.
-
getNumHours
long getNumHours()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.- Returns:
- the number of hours
- Compliance:
mandatory- This method must be implemented.
-
getNumHoursForDay
Gets the number of hours for a given day.- Parameters:
year- a yearmonth- aDateTimemonth codeday- aDateTimeday code- Returns:
- the number of hours
- Throws:
IllegalStateException-yearis greater thanCalendarInfo.getLastYearBeforeCommonEra()and less thenCalendarInfo.getFirstYearInCommonEra(), ormonthis greater than or equal toCalendarInfo.getNumMonthsForYear(year), ordayis greater than or equal toCalendarInfo.getDaysInMonth(year, month)OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getMinuteName
DisplayText getMinuteName()Gets the display name for "minutes."- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
getMinuteAbbrev
DisplayText getMinuteAbbrev()Gets the abbreviation for "minutes."- Returns:
- the abbreviation
- Compliance:
mandatory- This method must be implemented.
-
getMinuteInitial
DisplayText getMinuteInitial()Gets the initial for "minutes."- Returns:
- the initial
- Compliance:
mandatory- This method must be implemented.
-
hasVariableMinutes
boolean hasVariableMinutes()Tests if this time system has a variable number of minutes in an hour.- Returns:
trueif the number of minutes per hour varies,falseif the number of minutes per hour is constant- Compliance:
mandatory- This method must be implemented.
-
getNumMinutes
long getNumMinutes()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.- Returns:
- the number of minutes
- Compliance:
mandatory- This method must be implemented.
-
getNumMinutesForHour
long getNumMinutesForHour(long year, long month, long day, long hour) throws OperationFailedException Gets the minutes for a given hour.- Parameters:
year- a yearmonth- aDateTimemonth codeday- aDateTimeday codehour- an hour- Returns:
- the number of minutes
- Throws:
IllegalStateException-yearis greater thanCalendarInfo.getLastYearBeforeCommonEra()and less thenCalendarInfo.getFirstYearInCommonEra(), ormonthis greater than or equal toCalendarInfo.getNumMonthsForYear(year), ordayis greater than or equal toCalendarInfo.getDaysInMonth(year, month), orhouris greater than or equal togetNumHoursInDay(year, month, day)OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getSecondName
DisplayText getSecondName()Gets the display name for "seconds."- Returns:
- the name
- Compliance:
mandatory- This method must be implemented.
-
getSecondAbbrev
DisplayText getSecondAbbrev()Gets the abbreviation for "seconds."- Returns:
- the abbreviation
- Compliance:
mandatory- This method must be implemented.
-
getSecondInitial
DisplayText getSecondInitial()Gets the initial for "seconds."- Returns:
- the initial
- Compliance:
mandatory- This method must be implemented.
-
hasVariableSeconds
boolean hasVariableSeconds()Tests if this time system has a variable number of seconds in a minute.- Returns:
trueif the number of seconds per minute varies,falseif the number of seconds per minute is constant- Compliance:
mandatory- This method must be implemented.
-
getNumSeconds
long getNumSeconds()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.- Returns:
- the number of seconds
- Compliance:
mandatory- This method must be implemented.
-
getNumSecondsForMinute
long getNumSecondsForMinute(long year, long month, long day, long hour, long minute) throws OperationFailedException Gets the seconds for a given minute.- Parameters:
year- a yearmonth- aDateTimemonth codeday- aDateTimeday codehour- an hourminute- a minute- Returns:
- the number of seconds
- Throws:
IllegalStateException-yearis greater thangetLastYearBeforeCommonEra()and less thengetFirstYearInCommonEra(), ormonthis greater than or equal toCalendarInfo.getNumMonthsForYear(year), ordayis greater than or equal toCalendarInfo.getDaysInMonth(year, month), orhouris greater than or equal togetNumHoursInDay(year, month, day), orminuteis greater than or equal togetNumMinutesInhour(year, month, day, hour)OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-