serp-datetime
UTC date/time written in the Serpentine subset, over serp-time for the
clock. Dt is a year/month/day/hour/minute/second dataclass — UTC only,
second resolution; timezones (zoneinfo) come later per the roadmap.
API
make(y, mo, d, h, mi, s)/make_date(y, mo, d)— validated construction (ValueErrorwith CPython-style messages).now_utc()— current UTC time viaserp_time.time().to_unix(dt) -> int/from_unix(ts) -> Dt— proleptic Gregorian, days-from-civil algorithm (valid for any year).iso_format(dt)—YYYY-MM-DDTHH:MM:SS;parse_iso(s)accepts a date or dateTtime (space separator ok).weekday(dt)— 0 = Monday;day_of_year(dt);is_leap(y);days_in_month(y, m).add_days(dt, n),add_seconds(dt, n),diff_seconds(a, b)— timedelta-style arithmetic.
Stdlib classes
date, datetime and timedelta mirror the stdlib constructors with
CPython 3.11 validation messages, isoformat(), str/repr parity,
comparisons and +/- arithmetic.
date.fromisoformat(s)/datetime.fromisoformat(s)— naive values only; theTseparator is optional (a space works), a trailingZis accepted and ignored, fractional seconds are parsed to microseconds. UTC offsets are not supported.datetime.fromtimestamp(ts)— a UTC (not local) datetime, a divergence.datetime.utcnow()/utcnow()— current UTC time.
Install
serp add serp-datetime
pip install serp-datetime
Metadata
Release files for serp-datetime 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serp_datetime-0.3.0.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serp_datetime-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.0 kB
Release files / serp_datetime-0.3.0.tar.gz
| Download URL | serp_datetime-0.3.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f40fc136a5b8236e177224a0391f57295810e7f9b1af2e827f1afe82f619911
|
|
BLAKE2b-256 checksum How to use checksums |
5f5c7a2f8067127cad322f968a38f0ff54e87abe324187b7b33d5ea19ab07417
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / serp_datetime-0.3.0-py3-none-any.whl
| Download URL | serp_datetime-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c7a0ef87c7d826ea6d5907b2648f263e62e5dd1bbf6d243d724a0c0542b43d2
|
|
BLAKE2b-256 checksum How to use checksums |
80cac6cc622fa50b087a47832be2c3a09011dd17ca4389019e716547b9e3d8e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log