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.1.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.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rm_date_parser-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 cdcc0c3c60bc06207c4ac7c9a2fb69c37d7c288b3e9fb5ec6c3954fdbd184414
MD5 d9bf7f90656fcd28f1044cbe8c898746
BLAKE2b-256 0cffa6e75341222f4bfb7d4116cadcfcd761732f6947d659b37e942a9f0dddfe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rm_date_parser-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dac7d81ba2b9e600d85f60f2da3bb2ec6dcf71a7cf65891e394a603151d9540f
MD5 8e0377599b5b2a9ea5c4d4137c0eaafd
BLAKE2b-256 0964da216b6900015e26350621e6eccac524377cbd5748a46a0a4db2d13586bb

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