fixes
This commit is contained in:
parent
83c1580726
commit
287820464c
@ -41,7 +41,10 @@ basepath = os.path.dirname(os.path.abspath(__file__))
|
||||
SKIP_DATE_TOKENS = ['on', 'to', 'set', 'be']
|
||||
|
||||
|
||||
def parse_to_iso(dt):
|
||||
def parse_to_iso(dt, dt_hint=None):
|
||||
if dt_hint:
|
||||
parsed_dt = dateparser.parse(dt, date_formats=dt_hint)
|
||||
else:
|
||||
parsed_dt = dateparser.parse(dt)
|
||||
if parsed_dt:
|
||||
return parsed_dt.strftime(ISO_FORMAT)
|
||||
|
Loading…
Reference in New Issue
Block a user