Skip to main content

undate overview

undate

undate is a python library for working with uncertain or partially known dates.

[!NOTE] This is beta software; it is still in development and not fully feature complete. If you use it, please let us know and share your feedback.

Currently undate supports parsing, formatting, and reasoning with dates in varying precision and calendars; dates with different precision and from different original calendars can be used together. Supported formats include:

  • portions of EDTF (Extended Date Time Format)
  • ISO8601
  • parsing and calendar conversion for dates in Hebrew Anno Mundi and Islamic Hijri calendars
  • Gregorian dates with full or abbreviated month names in any order for multiple languages (English, Spanish, French, German, Kinyarwanda, Ganda, Tigrinya)
  • Christian liturgical dates (fixed holidays and movable feasts)

For unambiguous dates, there is an experimental omnibus parser which combines all available dates (bare years are currently assumed to be Gregorian calendar).

For more about the origin and goals of undate, read our 2025 software paper:

Rebecca Sutton Koeser, Julia Damerow, Robert Casties, and Cole Crawford. "Undate: Humanistic Dates for Computation." Computational Humanities Research, August 5, 2025.


DOI License Documentation Status unit tests codecov Ruff

All Contributors

Installation

Recommended: use pip to install the latest published version from PyPI:

pip install undate

To install a development version or specific tag or branch, you can install from GitHub. Use the @name notation to specify the branch or tag; e.g., to install development version:

pip install git+https://github.com/dh-tech/undate-python@develop#egg=undate

Quick Start

An Undate is analogous to python’s datetime.date but supports varying degrees of precision and unknown information. Initialize with strings or numbers for whichever parts of the date are known:

from undate import Undate, UndateInterval

november7 = Undate(2000, 11, 7)
november = Undate(2000, 11)
year2k = Undate(2000)
partially_known_year = Undate("19XX")

print([str(d) for d in [november7, november, year2k, partially_known_year]])
# [‘2000-11-07’, ‘2000-11’, ‘2000’, ‘19XX’]

print(repr(Undate.parse("Rajab 495", "Islamic")))
# undate.Undate(year=495, month=7, label="Rajab 495 Islamic", calendar="Islamic")

For full examples including duration, comparison, intervals, parsing, and calendar support, see the interactive documentation.

Documentation

Project documentation is available on ReadTheDocs.

For instructions on setting up for local development, see Developer Notes.

See Contributors for more detailed information about contributors.

Publications & Presentations

Related Projects

License

This software is licensed under the Apache 2.0 License.

Metadata

Release files for undate 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for undate 0.8.0
File Size Uploaded
undate-0.8.0.tar.gz 55.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for undate 0.8.0
File Interpreter ABI Platform
undate-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 107.2 kB

Release files / undate-0.8.0.tar.gz

Download URL undate-0.8.0.tar.gz
Size 55.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d30c51f953a2208b6331e7c2024bc5f5fdff073a5fb02845e6112fbb27731708
BLAKE2b-256 checksum
How to use checksums
07ba7ac5501cb190fa45c93388beaa1376e73bd894dc085dcf6e20ed7cace67a
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 Jul 30, 2026.

Transparency log

Release files / undate-0.8.0-py3-none-any.whl

Download URL undate-0.8.0-py3-none-any.whl
Size 51.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a19c103b7215ff0d2c501cbbcbce9f6e18846c9b02cb3b810ee8d9ad1128013c
BLAKE2b-256 checksum
How to use checksums
e2e00761203452bab3b8b58bb659bb0543fae7a3f99356eb05d504ea50d80177
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 Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page