Interface CalendarInfo


public interface CalendarInfo

This interface defines methods to examine a calendar. A calendar is organized into "years," "months," and "days." A calendar system may offer a diffreent designation for these divisions which may or may not vary in duration.

  • Method Details

    • getCalendarType

      Type getCalendarType()
      Gets the calendar type.
      Returns:
      the calendar type
      Compliance:
      mandatory - This method must be implemented.
    • getDisplayName

      DisplayText getDisplayName()
      Gets the display name for this calendar.
      Returns:
      the display name
      Compliance:
      mandatory - This method must be implemented.
    • getDescription

      DisplayText getDescription()
      Gets a description of this calendar.
      Returns:
      the description
      Compliance:
      mandatory - This method must be implemented.
    • getCommonEraName

      DisplayText getCommonEraName()
      Gets the string for the common era in which years are positive.
      Returns:
      the common era label
      Compliance:
      mandatory - This method must be implemented.
    • getCommonEraAbbrev

      DisplayText getCommonEraAbbrev()
      Gets the abbreviation for the common era in which years are positive.
      Returns:
      the common era label
      Compliance:
      mandatory - This method must be implemented.
    • getBeforeCommonEraName

      DisplayText getBeforeCommonEraName()
      Gets the string for before the common era in which years are negative.
      Returns:
      the before common era label
      Compliance:
      mandatory - This method must be implemented.
    • getBeforeCommonEraAbbrev

      DisplayText getBeforeCommonEraAbbrev()
      Gets the abbreviation for before the common era in which years are negative.
      Returns:
      the before common era label
      Compliance:
      mandatory - This method must be implemented.
    • getFirstYearInCommonEra

      long getFirstYearInCommonEra()
      Gets the year number for the first year.
      Returns:
      the first year
      Compliance:
      mandatory - This method must be implemented.
    • getLastYearBeforeCommonEra

      long getLastYearBeforeCommonEra()
      Gets the year number for the year before the common era.
      Returns:
      the last bce year
      Compliance:
      mandatory - This method must be implemented.
    • getYearName

      DisplayText getYearName()
      Gets the display name for a calendar "year."
      Returns:
      the name
      Compliance:
      mandatory - This method must be implemented.
    • getMonthName

      DisplayText getMonthName()
      Gets the display name for a calendar "month."
      Returns:
      the name
      Compliance:
      mandatory - This method must be implemented.
    • hasVariableMonths

      boolean hasVariableMonths()
      Tests if this calendar has a variable number of months in a year.
      Returns:
      true if the number of months varies, false if the number of months is constant
      Compliance:
      mandatory - This method must be implemented.
    • getNumMonths

      long getNumMonths()
      Gets the number of months of the year. For a variable month calendar, the number of all defined months are returned. If there are no "months" in this calendar system then this value may be zero.
      Returns:
      the number of months
      Compliance:
      mandatory - This method must be implemented.
    • getNumMonthsForYear

      long getNumMonthsForYear(long year) throws OperationFailedException
      Gets the number of months in the given year.
      Parameters:
      year - a year
      Returns:
      the number of months
      Throws:
      IllegalStateException - year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra()
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getMonths

      CalendarUnit[] getMonths()
      Gets the months of the year in order of the calendar. For a variable month calendar, all defined months are returned. If there are no "months" in this calendar system then the list may be empty.
      Returns:
      the months
      Compliance:
      mandatory - This method must be implemented.
    • getMonthsForYear

      CalendarUnit[] getMonthsForYear(long year) throws OperationFailedException
      Gets the months of the year in order of the calendar.
      Parameters:
      year - a year
      Returns:
      the months
      Throws:
      IllegalStateException - year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra()
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getDayName

      DisplayText getDayName()
      Gets the display name for a calendar "day."
      Returns:
      the name
      Compliance:
      mandatory - This method must be implemented.
    • hasVariableDays

      boolean hasVariableDays()
      Tests if this calendar has a variable number of days in a month.
      Returns:
      true if the number of days per month varies, false if the number of days is constant
      Compliance:
      mandatory - This method must be implemented.
    • getNumDays

      long getNumDays()
      Gets the number of days in a year. For a variable day calendar, the number of all defined days are returned. If there are no "days" in this calendar system then this value may be zero. If there are no "months" defined then the number of days is the number of days in a year.
      Returns:
      the number of days
      Compliance:
      mandatory - This method must be implemented.
    • getNumDaysForMonth

      long getNumDaysForMonth(long year, long month) throws OperationFailedException
      Gets the number of days in the given month.
      Parameters:
      year - a year
      month - a DateTime month code
      Returns:
      the number of days
      Throws:
      IllegalStateException - year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra() , or month is greater than getMonthsForYear(year)
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getDays

      CalendarUnit[] getDays()
      Gets the days of the month in order of the calendar. For a variable day calendar, all defined days are returned. If there are no "days" in this time system then this value may be zero. If there are no "months" defined then the number of days applies to the entire year.
      Returns:
      the days
      Compliance:
      mandatory - This method must be implemented.
    • getDaysForMonth

      CalendarUnit[] getDaysForMonth(long year, long month) throws OperationFailedException
      Gets the days of the given month in order of the calendar.
      Parameters:
      year - a year
      month - a DateTime month code
      Returns:
      the days
      Throws:
      IllegalStateException - year is greater than getLastYearBeforeCommonEra() and less then getFirstYearInCommonEra() , or month is greater than or equal to than getMonthsForYear(year)
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getFirstDayOfYear

      DateTime getFirstDayOfYear()
      Gets the first day of the calendar year.
      Returns:
      the first day of the year
      Compliance:
      mandatory - This method must be implemented.
    • getEndOfDaysName

      DisplayText getEndOfDaysName()
      Gets the display name for the end of the calendar.
      Returns:
      the name
      Compliance:
      mandatory - This method must be implemented.
    • getOrigin

      DateTime getOrigin()
      Gets the start of the "common era" for this calendar.
      Returns:
      start of the calendar
      Compliance:
      mandatory - This method must be implemented.
    • getEndOfDays

      DateTime getEndOfDays()
      Gets the end of the world as specified by this calendar.
      Returns:
      end of days
      Compliance:
      mandatory - This method must be implemented.
    • getWeekdays

      CalendarUnit[] getWeekdays()
      Gets the days of the week in order of the calendar.
      Returns:
      the week days
      Compliance:
      mandatory - This method must be implemented.