Provides a DateDelta class for arithmetic between dates, similar to datetime.timedelta but for date objects. Current version 1.4, release cadence is low (last release 2019).
Install & Compatibility
Where this runs
tested against v1.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from datedelta import datedelta
Add a DateDelta to a date to get another date.
from datetime import date
from datedelta import DateDelta, DAYS, MONTHS, YEARS
today = date.today()
delta = DateDelta(years=1, months=2, days=10)
new_date = today + delta
print(new_date)
# Or using constants:
new_date2 = today + 1*YEARS + 2*MONTHS + 10*DAYS
print(new_date2)
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.