Skip to content

v0.5.0 — Improved time handling

Compare
Choose a tag to compare
@jwodder jwodder released this 21 May 17:32
· 69 commits to master since this release
v0.5.0
  • Improved the routine for assembling request_time from request_time_fields:
    • If the month is only available as a full or abbreviated name and the name is not in English, try looking it up in the current locale
    • If the year is only available in abbreviated form (the %y directive) without a century (%C), treat years less than 69 as part of the twenty-first century and other years as part of the twentieth
    • When necessary, use the values of the %G, %g, %u, %V, %U, %W, and %w time directives to derive the date
    • If %Z equals "GMT", "UTC", or one of the names in time.tzname, produce an aware datetime
  • %{%n}t and %{%t}t now match any amount of any whitespace, in order to match strptime(3)'s behavior
  • Breaking: Renamed the request_time_fields keys for %{%G}t and %{%g}t from "week_year" and "abbrev_week_year" to "iso_year" and "abbrev_iso_year", respectively
  • %{%p}t can now match the empty string (its value in certain locales)
  • %{%Z}t can now match the empty string