Finds every date in text and returns each one with the detected format
Project description
DateParserPython
A lightweight Python port of the DateParser logic used to identify and normalize dates and times in natural-language text. The package exposes a single Parser class that scans free-form strings and returns structured LocalDateModel results containing normalized values, the detected format, and the source offsets.
Installation
pip install dateparserpython
To work with a local clone, install the project in editable mode (this also makes the dateparserpython package importable straight from the repo):
python -m pip install -e .
Quickstart
from dateparserpython import Parser
parser = Parser()
for local_date in parser.parse("12/12/2025"): # Pass any free‑form text
print(local_date.date_time_string, local_date.identified_date_format)
Running python test.py prints a set of parsed examples for convenience.
Development
- Create a virtual environment and activate it.
- Install editable dependencies:
python -m pip install -e .[dev](dev extras coming soon; currently empty). - Run unit tests / scripts from the project root. For ad-hoc checks you can run
python test.pyor create your own fixtures.
Please open an issue or PR if you hit a parsing case that is not currently supported.
Project details
Release history Release notifications | RSS feed
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 rm_date_parser-0.2.2.tar.gz.
File metadata
- Download URL: rm_date_parser-0.2.2.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db6fdde37484ef4fbbc7d412e7edf477a96cc9efcd7454c9988a27bb0e497b4f
|
|
| MD5 |
755aaf40090d32e679066caccbcc4e1f
|
|
| BLAKE2b-256 |
c1bc215a460aa858bb813de70e284c22e9f7977c40194e8d94bacd129a28988f
|
File details
Details for the file rm_date_parser-0.2.2-py3-none-any.whl.
File metadata
- Download URL: rm_date_parser-0.2.2-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04965921caa2817b7a7cc0c16e7ee131983e62bacc331602ac3995b54ab8e3b7
|
|
| MD5 |
ca40fc29fe3d302618be7d133100ef0b
|
|
| BLAKE2b-256 |
c4b0150f2c6bd7101019803c03eb175d31fcfb145af6461ef1fbe3057304b00d
|