timex v3.7.3 Release Notes

  • NOTE: The config of the Timex default locale is changed to:

    config :your_app, Timex.Gettext, default_locale: "en"
    

    ๐Ÿ‘€ This follows the standard set by Gettext, see: the Gettext docs

    Now when the Gettext locale is being changed on runtime with:

    Gettext.put_locale("nl")
    

    The Gettext backend for Timex will follow suit. If for some reason you want Timex, and just Timex, to change its locale to something else you should target the Timex.Gettext backend with:

    Timex.Gettext.put_locale("de")
    

    Potentially Breaking

    • ๐Ÿ›  Fixed handling of Etc/GMT vs GMT timezones. The former must be POSIX compatible, which inverts the meaning of the sign, whereas the latter have no such restriction and are equivalent to UTC(+/-)HH:MM, while this is fixing incorrect behavior, it could potentially break users relying on the incorrect behavior.

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ #494, incorrect handling of parsing week numbers
    • ๐Ÿ‘Œ Improve parsing of timezones
    • Incorrect stringification of error values returned in some circumstances
    • ๐Ÿ‘€ Let Timex follow the locale set by the global Gettext. See #501

    โž• Added/Changed

    • โœ‚ Removed Timex.Timezone.diff, as it is no longer used in Timex
    • Added support for obtaining the Julian day of year via Calendar.Julian.date_for_day_of_year/3

    ๐Ÿ›  Fixed