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

RELATIVE_BASE supersedes PREFER_MONTH_OF_YEAR #1226

Open
gsakkis opened this issue May 28, 2024 · 0 comments
Open

RELATIVE_BASE supersedes PREFER_MONTH_OF_YEAR #1226

gsakkis opened this issue May 28, 2024 · 0 comments

Comments

@gsakkis
Copy link

gsakkis commented May 28, 2024

MCVE:

In [1]: from datetime import datetime

In [2]: import dateparser

In [3]: settings={'PREFER_DAY_OF_MONTH': 'first', 'PREFER_MONTH_OF_YEAR': 'first', 'RELATIVE_BASE': datetime(2023, 8, 23)}

In [4]: dateparser.parse("2022", settings=settings).date()
Out[4]: datetime.date(2022, 8, 1)

In [5]: dateparser.__version__
Out[5]: '1.2.0'
@gsakkis gsakkis changed the title PREFER_MONTH_OF_YEAR ignores RELATIVE_BASE RELATIVE_BASE supersedes PREFER_MONTH_OF_YEAR May 28, 2024
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