akoumjian / datefinder

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

"On <month_name>" gives a weirdly extracted date value #181

Closed khanfarhan10 closed 1 year ago

khanfarhan10 commented 1 year ago

"text": "12-December-2022 00:00:00", "src_string": "on dec", "line_idx": 29, "span_of_indices": [ 54, 59 ]

akoumjian commented 1 year ago

Underlying library will fill in today's month day number and year when creating a date from incomplete data. You can adjust this behavior by providing a base_date which will be used to fill in missing components.

https://github.com/akoumjian/datefinder/blob/master/datefinder/__init__.py#L24