scrapinghub / dateparser

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

Inconsistent parsing of a date like "Oct-23" #1235

Open MrinalJain17 opened 3 months ago

MrinalJain17 commented 3 months ago

The following can be reproduced with dateparser v1.2.

import dateparser

settings = {"REQUIRE_PARTS": ["month", "year"]}

dateparser.parse("Mar-23", settings=settings)  # Correctly parsed

dateparser.parse("Oct-23", settings=settings)  # Parsing fails
dateparser.parse("Oct-23")                     # Parsing succeeds

Weirdly, this parsing failure only happens for the month of October.