akoumjian / datefinder

Find dates inside text using Python and get back datetime objects
http://datefinder.readthedocs.org/en/latest/
MIT License
635 stars 165 forks source link

can't extract the date from following string #153

Open TalibCode opened 3 years ago

TalibCode commented 3 years ago
s="Publication date:08/06/2021 19:43"
print(helper.is_ascii(s))
matches = list(datefinder.find_dates(s))
print(matches)

it returns empty list

lynxoid commented 1 year ago

It seems that datefinder can not extract the date if there is a digit following it:

>>> list(datefinder.find_dates("11/20/1972"))
[datetime.datetime(1972, 11, 20, 0, 0)]
>>> list(datefinder.find_dates("11/20/1972 4"))
[]

datefinder version 0.7.3