Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GlibAI/pydateparser

Repository files navigation

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.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.

AltStyle によって変換されたページ (->オリジナル) /