github arrow-py/arrow 1.2.1
Version 1.2.1

latest releases: 1.3.0, 1.2.3, 1.2.2...
2 years ago
  • [NEW] Added quarter granularity to humanize, for example:
    >>> import arrow
    >>> now = arrow.now()
    >>> four_month_shift = now.shift(months=4)
    >>> now.humanize(four_month_shift, granularity="quarter")
    'a quarter ago'
    >>> four_month_shift.humanize(now, granularity="quarter")
    'in a quarter'
    >>> thirteen_month_shift = now.shift(months=13)
    >>> thirteen_month_shift.humanize(now, granularity="quarter")
    'in 4 quarters'
    >>> now.humanize(thirteen_month_shift, granularity="quarter")
    '4 quarters ago'
  • [NEW] Added Sinhala and Urdu locales.
  • [NEW] Added official support for Python 3.10.
  • [CHANGED] Updated Azerbaijani, Hebrew, and Serbian locales and added tests.
  • [CHANGED] Passing an empty granularity list to humanize now raises a ValueError.

Commits since last release

New Contributors

Full Diff: 1.2.0...1.2.1

Don't miss a new arrow release

NewReleases is sending notifications on new releases.