Skip to content

Releases: ariebovenberg/whenever

0.5.2

30 Apr 17:58
Compare
Choose a tag to compare

Add Date.py_date() (#118)

0.5.1

02 Apr 15:20
Compare
Choose a tag to compare

Fix LocalSystemDateTime.now() not setting the correct offset (#104)

0.5.0

21 Mar 09:52
Compare
Choose a tag to compare

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 uses P 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.

0.4.0

13 Mar 13:53
Compare
Choose a tag to compare

A big release with the main feature being the addition of date/time deltas.
I've also tried to bundle as many small breaking changes as possible into
this release, to avoid having to do them in the future.

For the rationale behind each breaking change, see the full changelog

Breaking changes

  • LocalDateTime renamed to LocalSystemDateTime.
  • LocalSystemDateTime no longer adjusts automatically to changes in the system timezone. Now, LocalSystemDateTime reflects the system timezone at the moment of instantiation. It can be updated explicitly.
  • The disambiguate= argument now also determines how non-existent times are handled.
  • from_naive() removed in favor of methods on NaiveDateTime. For example, UTCDateTime.from_naive(n) becomes n.assume_utc().
  • Renamed ZonedDateTime.disambiguated() to .is_ambiguous().
  • Replaced .py property with .py_datetime() method.
  • Removed properties that simply delegated to the underlying datetime object: tzinfo, weekday, and fold. date and time now return whenever.Date and whenever.Time objects.
  • Renamed .canonical_str() to .canonical_format().
  • Renamed DoesntExistInZone to SkippedTime, Ambiguous to AmbiguousTime.
  • Renamed min and max to MIN and MAX.

Improved

  • Added a disambiguation="compatible" option that matches the behavior of other languages and the RFC5545 standard.
  • Shortened the repr() of all types, use space separator instead of T.
  • Added sep="T" or " " option to canonical_format()
  • OffsetDateTime constructor and methods creating offset datetimes now accept integers as hour offsets.
  • Added Date and Time classes for working with dates and times separately.

0.3.4

07 Feb 06:28
Compare
Choose a tag to compare

Improved exception messages for ambiguous or non-existent times (#26)

0.3.3

04 Feb 10:16
Compare
Choose a tag to compare

💾 Add CPython-maintained tzdata package as Windows dependency (#32)

0.3.2

03 Feb 22:08
Compare
Choose a tag to compare

🔓 Relax overly strict Python version constraint in package metadata (#33)

0.3.1

01 Feb 17:39
Compare
Choose a tag to compare

📦 Fix packaging metadata issue involving README and CHANGELOG being installed in the wrong place (#23)

0.3.0

23 Jan 15:40
Compare
Choose a tag to compare

Breaking changes

  • 🥒 Change pickle format so that backwards-compatible unpickling is possible in the future.

Added

  • 🔨 Added strptime() to UTCDateTime, OffsetDateTime and NaiveDateTime.
  • 📋 Added rfc2822()/from_rfc2822() to UTCDateTime, OffsetDateTime and NaiveDateTime.
  • ⚙️ Added rfc3339()/from_rfc3339() to UTCDateTime and OffsetDateTime

0.2.1

20 Jan 21:50
Compare
Choose a tag to compare
  • added days() timedelta alias
  • Improvements to README, other docs