dateparser icon indicating copy to clipboard operation
dateparser copied to clipboard

Inconsistent behavior on shortened month name (portuguese and spanish)

Open Mateuscvieira opened this issue 1 year ago • 0 comments

The parse function behaves inconsistently when dealing with shortened dates in Portuguese: image

The function works as expected until April, which is written Abril in PT, thus abr/18, and then it interprets the 18 as the day of the month. Changing abr to apr makes the function work. I have confirmed the same issue appears in spanish. It's important to note that the function is indeed recognizing that abr is April, because it is returning a date in the correct month, but it for some reason ignores the specification that the "/18" is the year, not the day.

The bug was found on Windows 10, but I reproduced it now on Fedora 40, KDE spin, kernel version 6.8.11-300.fc40.x86_64. Python is 3.12.3 on a fresh install using rye.

Mateuscvieira avatar Jun 20 '24 23:06 Mateuscvieira