scrapinghub / dateparser

python parser for human readable dates
BSD 3-Clause "New" or "Revised" License
2.57k stars 465 forks source link

can't parse 'Mon, 12 Dec 2022 10:07:48 +0000' #1120

Closed 0xDEADFED5 closed 1 year ago

0xDEADFED5 commented 1 year ago

unable to parse strings like the following: Mon, 12 Dec 2022 10:07:48 +0000 if I remove the 'Mon, ' part, like using the following regex, then it works: foo = re.sub('^\\w+, ', '', foo)

asadurski commented 1 year ago

Thank you. Already reported in https://github.com/scrapinghub/dateparser/issues/1116. Please follow that issue.

serhii73 commented 1 year ago

dateparser 1.1.6 is out where fixed this bug @0xDEADFED5

In [1]: import dateparser

In [2]: dateparser.parse('Mon, 12 Dec 2022 10:07:48 +0000')
Out[2]: datetime.datetime(2022, 12, 12, 10, 7, 48, tzinfo=<StaticTzInfo 'UTC\+00:00'>)

In [3]: dateparser.__version__
Out[3]: '1.1.6'