akoumjian / datefinder

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

Non-date (year) being interpreted as a date (year) #75

Closed DavidRDoyle closed 6 years ago

DavidRDoyle commented 6 years ago

Hi, Datefinder is great - thank you. Could you take a look at the text in the data variable below and suggest why 6277 is being interpreted as a year while 9255 and 6010 are not (correctly) being interpreted as years?

import datefinder data = "Your appointment is on July 14th, 2016. Your bill is due 05/05/2016 at 5:30pm. Operated by Reader Offers Ltd (ABTA F9255 & W6277, ATOL 6010) trading as ROL Cruise." matches = datefinder.find_dates(data) for match in matches: print(match)

Results: 2016-07-14 00:00:00 2016-05-05 17:30:00 6277-04-30 00:00:00

Thank you

satheeshkatipomu commented 6 years ago

HI, I am also facing the same issue. Did you find any solution?