You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dateparser
>>> from datetime import datetime, timedelta
>>>
>>> def date(s):
... parsed_date = dateparser.parse(s, settings={"PREFER_DATES_FROM": "future"})
... return parsed_date.strftime("%a %b %d")
...
>>>
>>> date("Friday")
'Tue Oct 08'
>>> datetime.now()
datetime.datetime(2024, 10, 31, 21, 37, 14, 810455)
I called this method earlier today, before UTC time (I'm -4) was past midnight and I got Oct 1 instead, also a Tuesday. Checking the year reveals that it's indeed Oct 2024 which is in the past.
dateparser==1.2.0
The text was updated successfully, but these errors were encountered:
I called this method earlier today, before UTC time (I'm -4) was past midnight and I got Oct 1 instead, also a Tuesday. Checking the year reveals that it's indeed Oct 2024 which is in the past.
dateparser==1.2.0
The text was updated successfully, but these errors were encountered: