scrapinghub / dateparser

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

Parsing very short weekday names #1170

Open jimbofreedman opened 1 year ago

jimbofreedman commented 1 year ago

(Python 3.10.2/dateparser 1.1.8

>>> DAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
>>> for d in DAYS:
...   print(dateparser.parse(d))
... 
2023-06-19 00:00:00
None
None
None
2023-06-16 00:00:00
2023-06-17 00:00:00
2023-02-19 00:00:00
>>> 

Dateparser can identify Mo/Fr/Sa/Su as days of the week on their own but not Tu/We/Th - is this by design - perhaps because they'd be ambiguous?

Gallaecio commented 1 year ago

I don’t think it is by design, and I would expect them to work at least if you pass languages=["en"], so I think it might be a bug.

avishmehta68710 commented 1 year ago

one ques = if you see the above output the date of su is of feb month, but the current month is 06