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 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:
      true if the number of hours per day varies, false if 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

      long getNumHoursForDay(long year, long month, long day) throws OperationFailedException
      Gets the number of hours for a given day.
      Parameters:
      year - a year
      month - a DateTime month code
      day - a DateTime day code
      Returns:
      the number of hours
      Throws:
      IllegalStateException - 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)
      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:
      true if the number of minutes per hour varies, false if 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 year
      month - a DateTime month code
      day - a DateTime day code
      hour - an hour
      Returns:
      the number of minutes
      Throws:
      IllegalStateException - 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)
      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:
      true if the number of seconds per minute varies, false if 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 year
      month - a DateTime month code
      day - a DateTime day code
      hour - an hour
      minute - a minute
      Returns:
      the number of seconds
      Throws:
      IllegalStateException - 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)
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.