Skip to main content

Convert a date written as text in a certain way to a datetime object.

Project description

Convert plain text to datetime

License Code style: black

Currently only supporting English.

Convert a date written as text in a certain way 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")

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.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

textime-1.0.0-py3-none-any.whl (3.9 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