Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing very short weekday names #1170

Open
jimbofreedman opened this issue Jun 19, 2023 · 2 comments · May be fixed by #1214
Open

Parsing very short weekday names #1170

jimbofreedman opened this issue Jun 19, 2023 · 2 comments · May be fixed by #1214

Comments

@jimbofreedman
Copy link

(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
Copy link
Member

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
Copy link

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

adnan-awan added a commit that referenced this issue Jan 28, 2024
- Add three letter name for `wednesday`
- #1170
@adnan-awan adnan-awan linked a pull request Jan 28, 2024 that will close this issue
adnan-awan added a commit that referenced this issue Jan 30, 2024
- Update en.yaml file to support two letters days of the week
- #1170
adnan-awan added a commit that referenced this issue Jan 30, 2024
- Develop method to remove_multiple_occurrences of the day(s) of the week
- #1170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants