Closed crystalfp closed 6 years ago
A valid ISO8601 date containing only year and month (2017-09) is wrongly parsed if language is "it". Running the following code in November gives:
import dateparser dt = dateparser.parse("2017-09", languages=["it"], settings={'PREFER_DAY_OF_MONTH': 'first', 'PREFER_DATES_FROM': 'past'}) print(dt.date()) #prints: 2017-11-09 dt = dateparser.parse("2017-09", settings={'PREFER_DAY_OF_MONTH': 'first', 'PREFER_DATES_FROM': 'past'}) print(dt.date()) #prints 2017-09-01
I'm forced to specify the language to cover ambiguous dates like 03/04/2017
Thanks for looking! mario
Forgot to add: python 3.6.2 on Windows 10 64 bits
FYI, you filed this issue with the wrong project. The dateparser project is here: https://github.com/scrapinghub/dateparser
Oppssss.... Sorry.
A valid ISO8601 date containing only year and month (2017-09) is wrongly parsed if language is "it". Running the following code in November gives:
I'm forced to specify the language to cover ambiguous dates like 03/04/2017
Thanks for looking! mario