dateparser icon indicating copy to clipboard operation
dateparser copied to clipboard

Parsing very short weekday names

Open jimbofreedman opened this issue 2 years ago • 2 comments

(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?

jimbofreedman avatar Jun 19 '23 09:06 jimbofreedman

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.

Gallaecio avatar Jun 19 '23 09:06 Gallaecio

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

avishmehta68710 avatar Jul 19 '23 20:07 avishmehta68710