Releases: ariebovenberg/whenever
Releases · ariebovenberg/whenever
0.6.6
Fix potential memory leak in .now()
if time-machine
is used
0.6.5
0.6.4
- Add helper
patch_current_time
for patching current time in whenever (only) (#147) - Support patching the current time with time-machine (#147)
- Remove undocumented
year
/month
/day
/offset
properties fromInstant
- Reduce size of binary distributions
- Clarify contribution guidelines
0.6.3
0.6.2
Add third-party licenses to distributions
0.6.1
Small updates to project metadata
0.6.0
🎉 A big release touting a Rust extension module and an API more consistent with other modern libraries.
Added or improved
- Implement as a Rust extension module, leading to a big speedup
- Add
replace_date
andreplace_time
methods to datetimes. - Add
Date.MIN
andDate.MAX
constants. from_py_*
methods are more robust.- The pickle format for most types is now more efficient.
Breaking changes
(see the changelog for the full rationale behind each change)
UTCDateTime
is nowInstant
. Removed methods that were specific to UTC.NaiveDateTime
is nowLocalDateTime
- Nanosecond precision is now the default for all datetimes and deltas.
nanosecond
is a keyword-only argument for all constructors, to prevent mistakes porting code fromdatetime
(which uses microseconds). - Unified
[from_]canonical_format
methods with[from_]common_iso8601
methods into[format|parse]_common_iso
methods. - Timestamp methods now use integers instead of floats. There are now separate methods for seconds, milliseconds, and nanoseconds.
- Renamed
[from_][rfc3339|rfc2822]
methods to[format|parse]_[rfc3339|rfc2822]
. - Added explicit
ignore_dst=True
flag to DST-unsafe operations such as shifting an offset datetime. - Renamed
as_utc
,as_offset
,as_zoned
,as_local
toto_utc
,to_fixed_offset
,to_tz
,to_system_tz
, and theNaiveDateTime.assume_*
methods accordingly disambiguate=
is non-optional for all relevant methods. The only exception is the constructor, which defaults to "raise".- Removed weakref support.
- Weekdays are now an enum instead of an integer.
- Calendar units in
Date[Time]Delta
can now only be retrieved together. For example, there is nodelta.months
ordelta.days
anymore,delta.in_months_days()
should be used in this case. - Units in delta cannot be different signs anymore (after normalization).
- Calendar units are normalized, but only in so far as they can be converted strictly. For example, 1 year is always equal to 12 months, but 1 month isn't equal to a fixed number of days. Refer to the delta docs for more information.
- Renamed
AmbiguousTime
toRepeatedTime
. - Dropped Python 3.8 support
0.5.2
0.5.1
0.5.0
Breaking changes
- Fix handling of
-0000
offset in RFC2822 format, which was not according to the standard.NaiveDateTime
can now no longer be created from this format. DateDelta
canonical format now usesP
prefix.
Improved
- Add explicit ISO8601 formatting/parsing methods to datetimes, date, time, and deltas.
- Add missing
Date.from_canonical_format
method. - Separate docs for deltas and datetimes.
NaiveDateTime.assume_offset
now also accepts integers as hour offsets.