I'm using the dateparser
python package to search for dates in a string.
Following string provides unexpected result:
Input string:
Feb 12 SOME STRING TORO ON 508 . 50
Output result:
[('ON 508', datetime.datetime(1900, 1, 1, 5, 0, 8))]
Expected result:
None
Code:
from dateparser.search import search_dates
possible_dates = search_dates("Feb 12 SOME STRING TORO ON 508 . 50", languages=['en'], settings={'STRICT_PARSING': True})
for dt in possible_dates:
print (dt)
Any ideas why is this happening and how to correct this?
I've looked into setting format (cannot do that in search_dates
function).