Closed karthikshub closed 3 years ago
I can reproduce it as well.
Same root cause as #549 . Printing the content of this line, we can see that the locale used changed.
In [3]: dateparser.parse('now-15m')
...:
{'date_obj': datetime.datetime(2019, 9, 3, 15, 21, 32, 569534), 'period': 'day', 'locale': 'en'}
Out[3]: datetime.datetime(2019, 9, 3, 15, 21, 32, 569534)
In [4]: dateparser.parse('now-15d')
...:
{'date_obj': datetime.datetime(2019, 8, 19, 15, 36, 36, 695301), 'period': 'day', 'locale': 'lb'}
Out[4]: datetime.datetime(2019, 8, 19, 15, 36, 36, 695301)
In [5]: dateparser.parse('now-15m')
...:
{'date_obj': datetime.datetime(2018, 6, 3, 15, 36, 40, 798523), 'period': 'month', 'locale': 'lb'}
Out[5]: datetime.datetime(2018, 6, 3, 15, 36, 40, 798523)
Thank you !
This was fixed in the last version dateparser==1.0.0
: https://github.com/scrapinghub/dateparser/pull/781
Thanks for the feedback :)
now-15m doesn't result consistent output.