Whenever

Latest version: v0.7.3

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

0.7.3

------------------

- Fixed type annotations of ``Weekday`` enum values, so they are properly
marked as ``int``.

0.7.2

------------------

- Fixed ``round()`` method behaving incorrectly when ``increment`` argument
is not passed explicitly (209)

0.7.1

------------------

- ``Date.add`` and ``Date.subtract`` now support ``DateDelta`` to be passed
as sole positional argument. This is consistent with the behavior of datetime
classes.
- Improved performance and robustness of date calculations at extreme boundaries
- Minor fixes to docstrings

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 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

-------------------

- 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

-------------------

- Fix bug in ``ZonedDateTime`` ``repr()`` that would mangle some timezone names
- Make ``disambiguate`` argument optional, defaulting to ``"compatible"``.

**Rationale**: This required parameter was a frequent source of
irritation for users. Although "explicit is better than implicit",
other modern libraries and standards also choose an (implicit) default.
For those that do want to enforce explicit handling of ambiguous times,
a special stubs file or other plugin may be introduced in the future.

- Various small fixes to the docs

Page 1 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.