Skip to content

Releases: ariebovenberg/whenever

0.7.1

24 Feb 07:21
Compare
Choose a tag to compare
  • Date.add and Date.subtract now support DateDelta to be passed as sole positional argument.
  • Improved performance and robustness of date calculations at extreme boundaries
  • Minor fixes to docstrings

0.7.0

21 Feb 07:32
Compare
Choose a tag to compare

This release adds rounding functionality, along with a small breaking change (see below).

Breaking changes

  • TimeDelta.py_timedelta() now truncates nanoseconds to microseconds instead of rounding them. Use the new round() method to customize rounding behavior.

Added

  • Added round() to all datetime, Instant, and TimeDelta classes
  • Add floor division and modulo operators to TimeDelta
  • Add is_ambiguous(), day_length() and start_of_day() to SystemDateTime, for consistency with ZonedDateTime.
  • Improvements to documentation

0.6.17

21 Feb 07:31
Compare
Choose a tag to compare
  • Added day_length() and start_of_day() methods to ZonedDateTime to make it easier to work with edge cases around DST transitions, and prepare for implementing rounding methods in the future.
  • Fix cases in type stubs where positional-only arguments weren't marked as such

0.6.16

22 Dec 21:33
Compare
Choose a tag to compare
  • Make disambiguate argument optional in all methods, defaulting to "compatible".
  • Fix bug in ZonedDateTime repr() that would mangle some timezone names
  • Various small fixes to the docs

0.6.15

11 Dec 21:37
Compare
Choose a tag to compare
  • Add Date.days_[since|until] methods for calculating the difference between two dates in days only (no months or years)
  • Improve docs about arithmetic rules for calendar and time units.

0.6.14

27 Nov 21:02
Compare
Choose a tag to compare

Fixed

  • Ensure docstrings and error messages are consistent in Rust extension as well as the pure-Python version
  • Remove undocumented properties hour/minute/etc from Instant that were accidentally left in the Rust extension.
  • exact_eq() now also raises TypeError in the pure Python version when comparing different types.

0.6.13

17 Nov 18:50
Compare
Choose a tag to compare

Added

  • Make from_py_datetime() methods of Instant/OffsetDateTime less pedantic. They now accept any aware datetime
  • New Date.today_in_system_tz() convenience method

Fixed

  • Parsing UTC offsets with out-of-range minute/second components (e.g. 06:79) now raises the expected parsing failure.
  • Note in parse_rfc2822() docstring that it doesn't (yet) validate the input, due to limitations in the underlying parser.

0.6.12

08 Nov 21:46
Compare
Choose a tag to compare

Fixed format_rfc3339() docs that incorrectly displayed a T separator. Clarified that T can be added by using the format_common_iso() method instead. (#185)

0.6.11

04 Nov 21:16
Compare
Choose a tag to compare
  • (new) Added YearMonth and MonthDay classes for working with year-month and month-day pairs
  • (fixed) whenever.__version__ is now also accessible when Rust extension is used

0.6.10

31 Oct 19:41
Compare
Choose a tag to compare

Improved

  • Improve method documentation and autocomplete support (#172, #173, #176)

Fixed

  • Remove lingering undocumented offset on Instant
  • Fix incorrect LocalDateTime.difference return type annotation