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

Issue parsing "in 1d" #863

Closed
kaylynnnn opened this issue Dec 29, 2020 · 3 comments · Fixed by #1104
Closed

Issue parsing "in 1d" #863

kaylynnnn opened this issue Dec 29, 2020 · 3 comments · Fixed by #1104
Assignees

Comments

@kaylynnnn
Copy link

kaylynnnn commented Dec 29, 2020

There's an issue parsing in "in 1d" with dateparser where it returns None but in 1s, in 1m, in 1h and in 1w returns the appropriate times.

>>> dateparser.parse("in 1s"), dateparser.parse("in 1m"), dateparser.parse("in 1h"), dateparser.parse("in 1d"), dateparser.parse("in 1w")
(datetime.datetime(2020, 12, 29, 15, 43, 32, 675063), datetime.datetime(2020, 12, 29, 15, 44, 31, 681036), datetime.datetime(2020, 12, 29, 16, 43, 31, 683038), None, datetime.datetime(2021, 1, 5, 15, 43, 34, 798560))
@Gallaecio
Copy link
Member

What happens if you force the language to English?

@kaylynnnn
Copy link
Author

What happens if you force the language to English?

>>> import dateparser
>>> dateparser.parse("in 1d", languages=["en"])
>>>

I get the same result.

serhii73 added a commit that referenced this issue Nov 25, 2022
@serhii73 serhii73 self-assigned this Nov 25, 2022
@serhii73
Copy link
Collaborator

It was fixed in #1103

Gallaecio pushed a commit that referenced this issue Nov 25, 2022
serhii73 added a commit that referenced this issue Dec 21, 2022
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