Closed fabiocaccamo closed 3 years ago
This is my current workaround:
date_service = DateService()
date_obj = date_service.extractDate(date_str)
now = datetime.now()
years = list(reversed(range(1990, now.year)))
for year in years:
year_str = str(year)
if year_str in date_str:
date_obj = date_obj.replace(year=year)
break;
Could you fix it please?
You can test this bug by extracting the date from the following string: "Instagram photo by @xxxx • Oct 3, 2015 at 2:16am UTC"
As you can see the year is wrong, it should extract 2015 instead of 2016.
Thanks for this great lib.