undate overview
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.
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
- Rebecca Sutton Koeser, Julia Damerow, Robert Casties, and Cole Crawford. “Undate: Humanistic Dates for Computation.” Software paper published in Computational Humanities Research, August 5, 2025.
- Rebecca Sutton Koeser. “Undate: Computing with Uncertain and Partially-Unknown Dates.” Computational notebook presented at USRSE’25. October 6, 2025.
- Rebecca Sutton Koeser. “Undate in Action.” Presentation at Digital Humanities Tech Symposium, DH2025. July 14, 2025.
- Rebecca Sutton Koeser. 2025. “Undate in Action.” In Digital Humanities Tech Symposium 2025—Anthology of Computers and the Humanities, edited by Julia Damerow and Rebecca Sutton Koeser, vol. 2.
- Rebecca Sutton Koeser. Join me for a DHTech hackathon? It’s an un-date! DHTech, February 9, 2023.
Related Projects
- ISO8601 date support and dates with unknown years, including duration, adapted from Shakespeare and Company Project (codebase)
- Parsing and calendar conversion for Hebrew Anno Mundi and Islamic Hijri calendars adapted from Princeton Geniza Project (PGP) (codebase); improved and verified with data and logic from the Islamic Scientific Manuscripts Initiative (ISMI)
- Parsing for dates in African languages inspired by work on and partially checked against data from MasakhaNER
- Parsing and calendar conversion for Christian liturgical holidays adapted from work on Hale/Eliot Letters project
License
This software is licensed under the Apache 2.0 License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file undate-0.8.0.tar.gz.
File metadata
- Download URL: undate-0.8.0.tar.gz
- Upload date:
- Size: 55.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d30c51f953a2208b6331e7c2024bc5f5fdff073a5fb02845e6112fbb27731708
|
|
| MD5 |
585b378fc4a90d5ea09206473bd9d37a
|
|
| BLAKE2b-256 |
07ba7ac5501cb190fa45c93388beaa1376e73bd894dc085dcf6e20ed7cace67a
|
Provenance
The following attestation bundles were made for undate-0.8.0.tar.gz:
Publisher:
python-publish.yml on dh-tech/undate-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
undate-0.8.0.tar.gz -
Subject digest:
d30c51f953a2208b6331e7c2024bc5f5fdff073a5fb02845e6112fbb27731708 - Sigstore transparency entry: 2291669224
- Sigstore integration time:
-
Permalink:
dh-tech/undate-python@a97ab293e74326cb7dc6d29dafed8683eb57e163 -
Branch / Tag:
refs/tags/0.8.0 - Owner: https://github.com/dh-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a97ab293e74326cb7dc6d29dafed8683eb57e163 -
Trigger Event:
release
-
Statement type:
File details
Details for the file undate-0.8.0-py3-none-any.whl.
File metadata
- Download URL: undate-0.8.0-py3-none-any.whl
- Upload date:
- Size: 51.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a19c103b7215ff0d2c501cbbcbce9f6e18846c9b02cb3b810ee8d9ad1128013c
|
|
| MD5 |
eb40ea058289f647aeaeaf3eb01445fc
|
|
| BLAKE2b-256 |
e2e00761203452bab3b8b58bb659bb0543fae7a3f99356eb05d504ea50d80177
|
Provenance
The following attestation bundles were made for undate-0.8.0-py3-none-any.whl:
Publisher:
python-publish.yml on dh-tech/undate-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
undate-0.8.0-py3-none-any.whl -
Subject digest:
a19c103b7215ff0d2c501cbbcbce9f6e18846c9b02cb3b810ee8d9ad1128013c - Sigstore transparency entry: 2291669263
- Sigstore integration time:
-
Permalink:
dh-tech/undate-python@a97ab293e74326cb7dc6d29dafed8683eb57e163 -
Branch / Tag:
refs/tags/0.8.0 - Owner: https://github.com/dh-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a97ab293e74326cb7dc6d29dafed8683eb57e163 -
Trigger Event:
release
-
Statement type: