Skip to main content

Python library that converts a date written as plain text to a datetime object.

Project description

Convert plain text to datetime

PyPI version PyPI - Downloads License Code style: black

Currently only supporting English.

Python library that converts a date written as plain text to a datetime object.

How to use it :computer:

First you install it in you environment like this

pip install textime

Then you can start using it already! Pass any string to the text parameter containing a date in the format: "DAY of MONTH of YEAR" where YEAR must be written out completely, like "first of May of two thousand and twenty one" or "second of August of one thousand nine hundred and ninety nine".

from datetime import datetime

from textime import textime


text_to_dt: datetime = textime.to_datetime(text="Fifteenth of July of two thousand and eight")

Contribution :pencil:

This project is open source. Contributions are welcome and appreciated. Please check our guide for contributing and our code of conduct as well.

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

textime-1.0.6.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

textime-1.0.6-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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