Skip to main content

dateparsa

Date parsing for input whose format you do not control.

CSV imports, log lines, third-party APIs, user-typed strings: dateparsa works out the format, parses the value, and tells you when it had to guess. It reads 32 structured formats, Unix timestamps by their digit count, dates written around a month name in 20 languages, and natural language ("next friday at 5pm"). It never reads a clock: an input that needs a base time is an error unless you pass one.

pip install dateparsa

Wheels for Linux (glibc and musl), macOS 13+ and Windows, on x86_64 and arm64, for Python 3.9 and later. No dependencies, and nothing to compile.

import dateparsa

r = dateparsa.parse("March 15, 2024")
r.datetime   # datetime(2024, 3, 15, 0, 0, tzinfo=timezone.utc)
r.label      # 'MONTH_DAY_YEAR'

# Ambiguity is reported, never hidden.
dateparsa.parse("01/02/2024").ambiguous                      # True: January 2nd was a guess
dateparsa.parse("01/02/2024", prefer_day_first=True)         # February 1st
try:
    dateparsa.parse("01/02/2024", strict=True)
except dateparsa.Ambiguous as e:
    e.interpretations                                         # the MM/DD/YYYY and DD/MM/YYYY readings

# A column settles what one value cannot.
column = ["01/02/2024", "05/06/2024", "13/02/2024"]
report = dateparsa.detect_column(column)
report.order                                                  # 'day_first', settled by row 2
[dateparsa.parse(v, **report.preferences) for v in column]   # each read day first

# Hand the format to pandas, Go or Java.
dateparsa.parse("13/02/2024 10:30").layout.format_string()   # '%d/%m/%Y %H:%M'

# Natural language and other languages, against a base time you choose.
from datetime import datetime, timezone
dateparsa.parse("vor 3 Tagen", base_time=datetime(2024, 3, 15, tzinfo=timezone.utc), locales=["de"])

parse takes keyword options: base_time, timezone_offset, prefer_day_first, prefer_year_first, prefer_future, strict and locales. A failed parse raises NoMatch, Ambiguous or NoBaseTime, all ValueErrors. Parser reads a column, reusing the first value's layout, and Layout.parse reads a value with no detection at all.

This package is a thin ctypes binding to libdateparsa, the C interface of the Zig library dateparsa.zig, whose README has the full format table and how its answers are checked: they match the Go original on 158,631 inputs. Apache-2.0; the locale data is derived from the Unicode CLDR under the Unicode License v3 (see NOTICE).

Metadata

Release files for dateparsa 0.3.2

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

Built distributions (wheels)

Table of built distributions (wheels) for dateparsa 0.3.2
File Actions
dateparsa-0.3.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for dateparsa-0.3.2-py3-none-win_arm64.whl
dateparsa-0.3.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for dateparsa-0.3.2-py3-none-win_amd64.whl
dateparsa-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl Python 3 none Linux musl 1.1+ x86-64, Linux glibc 2.17+ x86-64 Details for dateparsa-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl
dateparsa-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux musl 1.1+ ARM64 Details for dateparsa-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
dateparsa-0.3.2-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for dateparsa-0.3.2-py3-none-macosx_13_0_x86_64.whl
dateparsa-0.3.2-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for dateparsa-0.3.2-py3-none-macosx_13_0_arm64.whl

Total release size: 669.6 kB

Release files / dateparsa-0.3.2-py3-none-win_arm64.whl

Download URL dateparsa-0.3.2-py3-none-win_arm64.whl
Size 106.7 kB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
ebbc9462865ca664b48a95f76205be798e8aa063da58bb0b0df170d7b2bb77d1
BLAKE2b-256 checksum
How to use checksums
5cc59b61a4c2fd935ee0fb16d886d01583bd14d30f37c924a79804b3fd6dcced
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 Oct 29, 2026.

Transparency log

Release files / dateparsa-0.3.2-py3-none-win_amd64.whl

Download URL dateparsa-0.3.2-py3-none-win_amd64.whl
Size 139.3 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e2fb6d0ef6cddbb0add3b68f62ff9ee74ee1f4c18bef4a04d7af9d28e3950108
BLAKE2b-256 checksum
How to use checksums
3ff371f5f6107f387e79571faf0295844d429e94ea8226167ed78fe391315ee6
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 Oct 29, 2026.

Transparency log

Release files / dateparsa-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl

Download URL dateparsa-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl
Size 110.3 kB
Tags Linux glibc 2.17+ x86-64 Linux musl 1.1+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d666a56cfc4d37f9fbb07967a7e98a8eba1e761d517e51fe126a945dff565996
BLAKE2b-256 checksum
How to use checksums
d5c035c01019859d1dbded43f7a882179753518b4117ea8bb5154114e15f487c
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 Oct 29, 2026.

Transparency log

Release files / dateparsa-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl

Download URL dateparsa-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Size 112.3 kB
Tags Linux glibc 2.17+ ARM64 Linux musl 1.1+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2f9935b6c1a11ddb2efdeb8bd9d30542651c6f6ace1bb41650f6cdc63e13a442
BLAKE2b-256 checksum
How to use checksums
620b0b05c3fe6d8dda8790cfb8d4effbf696bd6e3d957fe1fe1d322ebab94bf2
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 Oct 29, 2026.

Transparency log

Release files / dateparsa-0.3.2-py3-none-macosx_13_0_x86_64.whl

Download URL dateparsa-0.3.2-py3-none-macosx_13_0_x86_64.whl
Size 99.2 kB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
84f979527298882c381fb94d73f5d7ef54620b660d917efabc914ec0bf93156e
BLAKE2b-256 checksum
How to use checksums
b87b35ba669a9b769517fdcc2b2336a26ec97a048a0d6c6d0c66e45674b6acaf
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 Oct 29, 2026.

Transparency log

Release files / dateparsa-0.3.2-py3-none-macosx_13_0_arm64.whl

Download URL dateparsa-0.3.2-py3-none-macosx_13_0_arm64.whl
Size 101.9 kB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
24e28f62729940d5654018f86ad5aea19413732b74dd798124335904791c96f7
BLAKE2b-256 checksum
How to use checksums
db15cb2824a574d9e9641f241d15b5ff4fb0d3d57cfe2bd03dd15224a1526667
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 Oct 29, 2026.

Transparency log

Security for dateparsa 0.3.2

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

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for dateparsa-0.3.2-py3-none-win_arm64.whl

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 Oct 29, 2026.

Transparency log

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

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