Skip to main content

Tool for understanding dates and times

Project description

# natural_time v1 A parser for understanding date-times written in a variety of formats

There are many great tools for interpreting dates and times when the format is known, however the aim of this project is to be able to interpret dates and times from much more fuzzy situations (e.g. Tomorrow afternoon at 3) as well as be able to extract the date or time from a sentence (e.g. I have an appointment at 6pm)

Has capability to understand both relative times (e.g. in 5 days) and absolute times (e.g tomorrow at 5pm)

This package can be installed using: pip install natural_time

How to use:
  1. Import the package using: import natural_time

  2. Run the function: natural_time.natural_time(“Your_String_Here”)

  3. Thats it (the natural_time function returns the date as datetime object)

If you find examples of phrases that don’t interpret correcly raise an issue via github and I’ll work on incorporating it, you are welcome to also make contributions to the code.

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

natural_time-1.2.0.tar.gz (11.7 kB view details)

Uploaded Source

File details

Details for the file natural_time-1.2.0.tar.gz.

File metadata

  • Download URL: natural_time-1.2.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.17

File hashes

Hashes for natural_time-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a6f27be15480457c87560332767bc16b0873348bfd545285d092779ef7b7499a
MD5 deab224e384765b3a0bf6dd351dcf0e2
BLAKE2b-256 d55635395c44e0354aa62500fa41cbd7d497dde1a79a8acd65710277bccbf808

See more details on using hashes here.

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