Skip to content

Support for last / past multiple months or weeks #1270

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

Open
AndreaSottana opened this issue May 14, 2025 · 0 comments
Open

Support for last / past multiple months or weeks #1270

AndreaSottana opened this issue May 14, 2025 · 0 comments

Comments

@AndreaSottana
Copy link

Are there any plans to add support for expressions such as "in the last 2 months" or "in the past week", or "in the past 3 months" etc?
At the moment they are not recognised.
As these expressions tend to mean a span of time rather than a single point in time, it would be appropriate to return the starting point of that span of time (considering the end point is today)

For example, if today is 14 May 2025, I would expect something like this

import dateparser
print(dateparser.parse("last 2 months"))

>>> 2025-03-14 11:53:12.301002
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

No branches or pull requests

1 participant