Releases: ariebovenberg/whenever
Releases · ariebovenberg/whenever
0.7.1
0.7.0
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 newround()
method to customize rounding behavior.
Added
- Added
round()
to all datetime,Instant
, andTimeDelta
classes - Add floor division and modulo operators to
TimeDelta
- Add
is_ambiguous()
,day_length()
andstart_of_day()
toSystemDateTime
, for consistency withZonedDateTime
. - Improvements to documentation
0.6.17
- Added
day_length()
andstart_of_day()
methods toZonedDateTime
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
- 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
- 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
Fixed
- Ensure docstrings and error messages are consistent in Rust extension as well as the pure-Python version
- Remove undocumented properties
hour
/minute
/etc fromInstant
that were accidentally left in the Rust extension. exact_eq()
now also raisesTypeError
in the pure Python version when comparing different types.
0.6.13
Added
- Make
from_py_datetime()
methods ofInstant
/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
0.6.11
- (new) Added
YearMonth
andMonthDay
classes for working with year-month and month-day pairs - (fixed)
whenever.__version__
is now also accessible when Rust extension is used