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

Wrong for Date format mm dd yyyy , if dd is less than or equal 12. #120

Closed CSEKU160212 closed 4 years ago

CSEKU160212 commented 4 years ago

If the date(dd part) is less than or equal 12, then it's output is wrong. Example: Input String: "The date is 12 01 2020" Output: 01/12/2020 where the pattern is (dd/mm/yyyy). but in input 12 is day and 01 is month/

jameswilliams1 commented 4 years ago

Doesn't look like there support for locales (I assume you would need en_GB), the date parser library used by this one may be able to help with functions in dateparser.search (can set the locale to GB as needed)