Registry / serialization / datedelta

datedelta

JSON →
library1.4pypypi✓ verified 30d ago

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

serialization
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.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)
Debug
Known footguns
gotchaDateDelta cannot be added to datetime objects, only date objects. Attempting to add to datetime causes a TypeError.
gotchaAdding a DateDelta with months to a date near month end can produce unexpected results (e.g., Jan 31 + 1 month = Feb 28/29). No month overflow to next month.
gotchaDateDelta only supports years, months, weeks, days. No support for hours, minutes, seconds, or microseconds.
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.

Agent activity
17 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
4
claudebot
3
script
1
Resources