Class FastDateParser.TimeZoneStrategy

Enclosing class:
FastDateParser

static class FastDateParser.TimeZoneStrategy extends FastDateParser.PatternStrategy
A strategy that handles a time zone field in the parsing pattern
  • Field Details

  • Constructor Details

    • TimeZoneStrategy

      TimeZoneStrategy(Locale locale)
      Constructs a Strategy that parses a TimeZone.
      Parameters:
      locale - The Locale.
  • Method Details

    • skipTimeZone

      static boolean skipTimeZone(String tzId)
      Tests whether to skip the given time zone, true if TimeZone.getTimeZone().

      On Java 25 and up, skips short IDs if ignoreTimeZoneShortIDs is true.

      This method is package private only for testing.

      Parameters:
      tzId - the ID to test.
      Returns:
      Whether to skip the given time zone ID.
    • setCalendar

      void setCalendar(FastDateParser parser, Calendar calendar, String timeZone)
      Specified by:
      setCalendar in class FastDateParser.PatternStrategy
    • toString

      public String toString()
      Converts this instance to a handy debug string.
      Overrides:
      toString in class FastDateParser.PatternStrategy
      Since:
      3.12.0