Open igo opened 5 years ago
@igo I believe this is a duplicate of #262. Could you close this issue and vote up #262 instead? This comment of mine already links your issue to #262, so hopefully, when support is implemented, your suggested examples of date range strings will be taken into consideration.
I think this would be very useful.
What I would expect as output from search_dates
would be like:
'12th - 13th April 2019' -> [('12th', datetime.datetime(2019, 4, 12, 0, 0)), ('13th April 2019', datetime.datetime(2018, 4, 13, 0, 0))]
'Aug - Sept 2018' -> [('Aug', datetime.datetime(2019, 8, 4, 0, 0)), ('Sept 2018', datetime.datetime(2018, 9, 4, 0, 0))]
I think that this is different than #262 . What is needed here is to change the RELATIVE_BASE
of the first date ('12th') to be equal to the full date object found in the input string ('13th April 2019').
Would be great to support recognition of date ranges like '12th - 13th April 2019', 'April 12-13', ...