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

DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious #1246

Open
wimglenn opened this issue Nov 27, 2024 · 0 comments

Comments

@wimglenn
Copy link

dateparser 1.2.0 on Python 3.13 / Linux:

$ python3 -q -Wall
>>> from dateparser import parse
>>> parse("2024-11-27")
.../lib/python3.13/site-packages/dateparser/utils/strptime.py:94: DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
and fails to parse leap day. The default behavior will change in Python 3.15
to either always raise an exception or to use a different default year (TBD).
To avoid trouble, add a specific year to the input & format.
See https://github.com/python/cpython/issues/70647.
  obj = datetime(*__strptime(date_string, format)[:-3])
.../lib/python3.13/site-packages/dateparser/utils/strptime.py:94: DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
and fails to parse leap day. The default behavior will change in Python 3.15
to either always raise an exception or to use a different default year (TBD).
To avoid trouble, add a specific year to the input & format.
See https://github.com/python/cpython/issues/70647.
  obj = datetime(*__strptime(date_string, format)[:-3])
datetime.datetime(2024, 11, 27, 0, 0)
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