Merge branch 'master' into develop
This commit is contained in:
commit
5c25208fb5
7
sleekxmpp/thirdparty/mini_dateutil.py
vendored
7
sleekxmpp/thirdparty/mini_dateutil.py
vendored
@ -166,6 +166,7 @@ except:
|
||||
(?P<month>[0-9]{2})?(?P=ymdsep)?
|
||||
(?P<day> [0-9]{2})?
|
||||
|
||||
(?P<time>
|
||||
(?: # time part... optional... at least hour must be specified
|
||||
(?:T|\s+)?
|
||||
(?P<hour>[0-9]{2})
|
||||
@ -192,6 +193,7 @@ except:
|
||||
(?P<tzm>[0-9]{2})
|
||||
)?
|
||||
)?
|
||||
)
|
||||
)?
|
||||
$
|
||||
""", re.X) # """
|
||||
@ -211,13 +213,16 @@ except:
|
||||
for key in vals:
|
||||
if vals[key] is None:
|
||||
vals[key] = def_vals.get(key, 0)
|
||||
elif key not in ['ymdsep', 'hmssep', 'tzempty']:
|
||||
elif key not in ['time', 'ymdsep', 'hmssep', 'tzempty']:
|
||||
vals[key] = int(vals[key])
|
||||
|
||||
year = vals['year']
|
||||
month = vals['month']
|
||||
day = vals['day']
|
||||
|
||||
if m.group('time') is None:
|
||||
return datetime.date(year, month, day)
|
||||
|
||||
h, min, s, us = None, None, None, 0
|
||||
frac = 0
|
||||
if m.group('tzempty') == None and m.group('tzh') == None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user