akoumjian/datefinder

Datetime fails to extract dates when they are right next to each other in a string

crkucera opened this issue · 1 comments

For example, this string: "created 01/15/2005 10/12/2021 by ACME Inc. and associates." yields no dates.

I have noticed this happens when a date follows another date or number and they are separated by just one or more delimiters from the supported delimiters (DELIMITERS_PATTERN). For example "date1 date2" where space is the delimiter (like the example above) or "num1. date1" where . and space are delimiters. In either case, no date is extracted successfully.

"date1 ch date2" or "num1. ch date1" work fine if ch is not one of the delimiters.