Skip to main content

date and time parsing library.

Project description

pydateparser


Maintenance made-with-python PyPI license PyPI status Open Source Love svg1 PyPI - Python Version Downloads

Table of Contents

Installation

pydateparser is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 3.6+.

$ pip install pydateparser

Usage

sample input:

from pydateparser import DateParser as parser

text = 'Today is 10/12/16 and tomorrow is January 01 2019.'
dp = parser(text, start_year=2000, end_year=2020, locale=None)

sample output:

dp.datetime

#output
[datetime(date='january 01 2019', token_span=(34, 49), token_index=(6, 8), locale='%B %d %Y'),
 datetime(date='10/12/16', token_span=(9, 17), token_index=(2, 2), locale='%d/%m/%y')]

for an extended usage demo refer this notebook.

License

pydateparser is distributed under the terms of the MIT License.

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

pydateparser-0.2.3.tar.gz (186.0 kB view hashes)

Uploaded Source

Built Distribution

pydateparser-0.2.3-py3-none-any.whl (12.0 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