datefinder
datefinder copied to clipboard
Problems with strict parameter when set to True
Hello. I'm trying to use this function 'datefinder.find_dates("P_CHIRPS.v2.0_mm-day-1_daily_2020.01.28.tif", source=True, strict=True)', the parameter strict is set to True cause otherwise the function will consider the '2.0' as a date (tried setting strict=False), but with strict=True I get nothing. Thanks for the help.
Same. strict=True
is returning nothing
PR https://github.com/akoumjian/datefinder/pull/109 should fix this.
I ended up using dateparser library where the strict parsing works as expected.
The dateparser library doesn't work with full strings such as My birthday is August 12, 1994
, where this does. I just want to be able to use the strict parameter correctly
@alwhelan22 dateparser
works with full strings.
But it picks up false positives as well:
from dateparser.search import search_dates
search_dates("My birthday is August 12 1994, and then hers in 6 months", settings={'STRICT_PARSING': True})
[('August 12 1994, and', datetime.datetime(1994, 8, 12, 0, 0)),
('in 6 months', datetime.datetime(1995, 2, 12, 0, 0))]