All Known Implementing Classes:
AmPmCompiledPattern, BcAdCompiledPattern, CompiledPattern, DayOfWeekCompiledPattern, LiteralCompiledItem, MonthCompiledPattern, NumberCompiledPattern, RomanNumeralsCompiledPattern, TimeZoneCompiledPattern, TimeZoneHoursCompiledPattern, TimeZoneMinutesCompiledPattern, TimeZoneOffsetCompiledPattern, YearWithCommasCompiledPattern

public interface CompiledItem
A single component of a parsed date/time format. Can be a pattern such as "YYYY" or a literal string. Able to output the string representation of a date/time component.
  • Method Details

    • convertToString

      String convertToString(ZonedDateTime dateTime, Locale locale)
      Creates one portion of the formatted date/time.
      Parameters:
      dateTime - date/time value to format
      locale - Locale to use for day or month names if the TM modifier was present
      Returns:
      the formatted String value of this date/time component
    • getFormatPatternLength

      int getFormatPatternLength()
      Returns the length of the format pattern.
      Returns:
      length of the format pattern