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

Cannot parse short days ago. Exp 1d ago #1048

Closed
hoangchunghien opened this issue Mar 18, 2022 · 2 comments · Fixed by #1103
Closed

Cannot parse short days ago. Exp 1d ago #1048

hoangchunghien opened this issue Mar 18, 2022 · 2 comments · Fixed by #1103
Assignees

Comments

@hoangchunghien
Copy link

Hi, I cannot parse some type of short days ago. Some examples

  • 1d ago
  • 1mon ago
  • 2y ago
from dateparser import parse

parse('1mon ago')

>> None
@danks-sayiqan
Copy link

danks-sayiqan commented May 31, 2022

another issue I find connected to this one:
other languages sometimes uses 'ago' and for french the dateparser cannot parse it.

from dateparser import parse

parse('4 hours ago')

>> datetime.datetime(2022, 5, 31, 8, 25, 46, 392093)
from dateparser import parse

parse('4 heures ago')

>> None
from dateparser import parse

parse('il y a 4 heures')

>> datetime.datetime(2022, 5, 31, 8, 29, 7, 442826)

I guess it should be really easy to fix this issue,
unless the short days as @hoangchunghien presented are a feature dateparser still doesn't includes

@Gallaecio
Copy link
Member

@danks-sayiqan Can you share a link to somewhere were “ago” is used in French? See #1110 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants