Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8339644

Improve parsing of Day/Month in tzdata rules

XMLWordPrintable

    • b15

        TzdbZoneRulesProvider currently parses tzdata rules with the assumption that the shortened Day or Month values will be used (e.g. "Mon" instead of "Monday")

        According to the zic man page, which the tzdata format adheres to, the long or short name may be used:

        ===
               IN Names the month in which the rule takes effect. Month
                      names may be abbreviated.

               ON Gives the day on which the rule takes effect. Recognized
                      forms include:

                        5 the fifth of the month
                        lastSun the last Sunday in the month
                        lastMon the last Monday in the month
                        Sun>=8 first Sunday on or after the eighth
                        Sun<=25 last Sunday on or before the 25th

                      A weekday name (e.g., Sunday) or a weekday name preceded
                      by “last” (e.g., lastSunday) may be abbreviated or spelled
                      out in full.

        ===

              naoto Naoto Sato
              coffeys Sean Coffey
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: