------------------
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.
**Breaking changes**
- ``LocalDateTime`` renamed to ``LocalSystemDateTime``.
**Rationale**: The ``LocalDateTime`` name is used in other libraries for
naive datetimes, and the new name is more explicit.
- ``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.
**Rationale**: The old behavior was dependent on too many assumptions, and
behaved unintuitively in some cases. It also made the class dependent on
shared mutable state, which made it hard to reason about.
- The ``disambiguate=`` argument now also determines how non-existent times
are handled.
**Rationale**: This makes it possible to handle both ambiguous and
non-existent times gracefully and in a consistent way.
This behavior is also more in line with the RFC5545 standard,
and Temporal.
- ``from_naive()`` removed in favor of methods on ``NaiveDateTime``.
For example, ``UTCDateTime.from_naive(n)`` becomes ``n.assume_utc()``.
**Rationale**: It's shorter, and more explicit about assumptions.
- Renamed ``ZonedDateTime.disambiguated()`` to ``.is_ambiguous()``.
**Rationale**: The new name distinguishes it from the ``disambiguate=``
argument, which also affects non-existent times.
- Replaced ``.py`` property with ``.py_datetime()`` method.
**Rationale**: Although it currently works fine as a property, this
may be changed in the future if the library no longer contains
a ``datetime`` internally.
- 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.
**Rationale**: Removing these properties makes it possible to create improved
versions. If needed, these properties can be accessed from the
underlying datetime object with ``.py_datetime()``.
- Renamed ``.canonical_str()`` to ``.canonical_format()``.
**Rationale**: A more descriptive name.
- Renamed ``DoesntExistInZone`` to ``SkippedTime``, ``Ambiguous`` to
``AmbiguousTime``.
**Rationale**: The new names are shorter and more consistent.
- Renamed ``min`` and ``max`` to ``MIN`` and ``MAX``.
**Rationale**: Consistency with other uppercase class constants
**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.