Class GJMonthOfYearDateTimeField


final class GJMonthOfYearDateTimeField extends BasicMonthOfYearDateTimeField
Provides time calculations for the month of the year component of time.
Since:
1.0
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version
      See Also:
  • Constructor Details

    • GJMonthOfYearDateTimeField

      GJMonthOfYearDateTimeField(BasicChronology chronology)
      Restricted constructor
  • Method Details

    • getAsText

      public String getAsText(int fieldValue, Locale locale)
      Description copied from class: BaseDateTimeField
      Get the human-readable, text value of this field from the field value. If the specified locale is null, the default locale is used.

      The default implementation returns Integer.toString(get(instant)).

      Note: subclasses that override this method should also override getMaximumTextLength.

      Overrides:
      getAsText in class BaseDateTimeField
      Parameters:
      fieldValue - the numeric value to convert to text
      locale - the locale to use for selecting a text symbol, null for default
      Returns:
      the text value of the field
    • getAsShortText

      public String getAsShortText(int fieldValue, Locale locale)
      Description copied from class: BaseDateTimeField
      Get the human-readable, short text value of this field from the field value. If the specified locale is null, the default locale is used.

      The default implementation returns getAsText(fieldValue, locale).

      Note: subclasses that override this method should also override getMaximumShortTextLength.

      Overrides:
      getAsShortText in class BaseDateTimeField
      Parameters:
      fieldValue - the numeric value to convert to text
      locale - the locale to use for selecting a text symbol, null for default
      Returns:
      the text value of the field
    • convertText

      protected int convertText(String text, Locale locale)
      Description copied from class: BaseDateTimeField
      Convert the specified text and locale into a value.
      Overrides:
      convertText in class BaseDateTimeField
      Parameters:
      text - the text to convert
      locale - the locale to convert using
      Returns:
      the value extracted from the text
    • getMaximumTextLength

      public int getMaximumTextLength(Locale locale)
      Description copied from class: BaseDateTimeField
      Get the maximum text value for this field. The default implementation returns the equivalent of Integer.toString(getMaximumValue()).length().
      Overrides:
      getMaximumTextLength in class BaseDateTimeField
      Parameters:
      locale - the locale to use for selecting a text symbol
      Returns:
      the maximum text length
    • getMaximumShortTextLength

      public int getMaximumShortTextLength(Locale locale)
      Description copied from class: BaseDateTimeField
      Get the maximum short text value for this field. The default implementation returns getMaximumTextLength().
      Overrides:
      getMaximumShortTextLength in class BaseDateTimeField
      Parameters:
      locale - the locale to use for selecting a text symbol
      Returns:
      the maximum short text length