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