I am trying to use the datefinder module with UK settings (i.e. day first in dates). I can see from the code that __init__ contains an option for first, defaulting to "month" (see below). This, I wish to change.
class DateFinder(object):
"""
Locates dates in a text
"""
def __init__(self, base_date=None, first="month"):
...
Source: datefinder GitHub repo
I have tried the below code, but it returns an error. Any thoughts where I am going wrong?
from datefinder import DateFinder
testString = 'here is some random text with a date of 2/11/1985 sat in the middle'
matches = DateFinder(first="day").find_dates(testString,index=True,source=True)
for match in matches:
print(match)
TypeError: __init__() got an unexpected keyword argument 'first'