date and time parsing library.
Project description
pydateparser
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.date
#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.6.tar.gz
(185.8 kB
view hashes)
Built Distribution
Close
Hashes for pydateparser-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48508c05020cf5cbd4981cdf1ea617717e52ef40137c30f218b75209969d860b |
|
MD5 | a7e7ef16904fce40d69b77de81180567 |
|
BLAKE2b-256 | 2078cce1929a656045b417448bce02a6eae6f3366ba9e557b3af18601ae8e3fe |