Skip to main content

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

  1. Create a virtual environment and activate it.
  2. Install editable dependencies: python -m pip install -e .[dev] (dev extras coming soon; currently empty).
  3. Run unit tests / scripts from the project root. For ad-hoc checks you can run python test.py or create your own fixtures.

Please open an issue or PR if you hit a parsing case that is not currently supported.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rm_date_parser-0.2.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rm_date_parser-0.2.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file rm_date_parser-0.2.0.tar.gz.

File metadata

  • Download URL: rm_date_parser-0.2.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for rm_date_parser-0.2.0.tar.gz
Algorithm Hash digest
SHA256 17d0ee2364d6bbc2f4017fa7bcc0e3d9bdda18dc1594589372aa1931e89413ba
MD5 e36dbfdae5d7fd7d3cab6f2a40d65e6d
BLAKE2b-256 315e082d24f9d923d3963a5ff94b03d5cbe7a1b99a407b7a57a0e46bc3020b85

See more details on using hashes here.

File details

Details for the file rm_date_parser-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rm_date_parser-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for rm_date_parser-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3396735eafba198e73f61e3510a38a6be1be0312bc178d5ad5db6f162934f667
MD5 b7bfa51c90f65be2f99251d1095d9277
BLAKE2b-256 4b4a31695b0ba120fb290f0bbb00bfd00af8721e2ed47306c043ad00aa1e0cac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page