TimeCore
A modern, unified, fully typed, cross-platform Python library for date, time, duration, intervals, calendars, recurrence, and scheduling.
TimeCore wraps established libraries (whenever, tzdata, tzlocal, python-dateutil, holidays, portion, babel, croniter) behind one cohesive, fully typed API, so date and time handling in Python no longer requires juggling several incompatible libraries.
Installation
Requires Python 3.11+.
uv add timecore
pip install timecore
With optional natural-language parsing support:
uv add "timecore[natural]"
Quick Start
from timecore import Date, DateTime, Duration, Period
today = Date(2026, 11, 25)
print(today + Period(months=1)) # 2026-12-25
print(today + Duration(days=10)) # 2026-12-05
meeting = DateTime(2026, 11, 25, 9, 0, timezone="America/New_York")
print(meeting.to_instant()) # 2026-11-25T14:00:00Z
Schedule a weekly Monday 9am meeting in New York:
from timecore import Recurrence, Schedule, Time, Weekday
schedule = Schedule(
Recurrence.weekly([Weekday.MONDAY]),
time=Time(9, 0),
timezone="America/New_York",
)
print(schedule.occurrences(Date(2026, 11, 23), count=3))
Parse strictly and format for a locale:
from timecore import parse_date
d = parse_date("2026-11-25") # strict ISO 8601; anything else raises ParseError
print(d.format()) # Nov 25, 2026
print(d.format(locale="fr_FR")) # 25 nov. 2026
See the documentation and the API reference for more.
Features
- Immutable, fully typed temporal value types
- Date, time, datetime, instant, duration, and period arithmetic
- Intervals and interval sets
- Calendars, holidays, and business days
- Recurrence rules and cron expressions
- Scheduling and availability
- Strict ISO 8601 parsing, locale-aware formatting, and optional natural-language parsing
- Injectable clocks and timers for deterministic testing
Development
uv sync --locked
uv run ruff format
uv run ruff check
uv run pyright
uv run pytest
uv run pytest --cov=timecore
uv build
License
MIT. See LICENSE.
Metadata
Release files for timecore 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| timecore-0.1.0.tar.gz | 66.2 kB | With provenance | Details for timecore-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| timecore-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for timecore-0.1.0-py3-none-any.whl |
Total release size: 153.3 kB
Release files / timecore-0.1.0.tar.gz
| Download URL | timecore-0.1.0.tar.gz |
|---|---|
| Size | 66.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
490630da3e208a78cdf35686620f4ce28cc63356fcc03ae9f36c102911fe6c6b
|
|
BLAKE2b-256 checksum How to use checksums |
5a9d98bb4938d3901f0cb0d94f5c22c8b7c787196bd8c8c68bff7219cd1aa17f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logRelease files / timecore-0.1.0-py3-none-any.whl
| Download URL | timecore-0.1.0-py3-none-any.whl |
|---|---|
| Size | 87.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4b013edf9f6a2c46f76c5dbd94f1406849b2bbb9eb1fe2b414d131a3a9d8022
|
|
BLAKE2b-256 checksum How to use checksums |
cf2876aef719fa311ba82c719d3b2e81de3d3494a421546ef54acae423024c84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logSecurity for timecore 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for timecore-0.1.0.tar.gz
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 Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.