absolute times before 7:00 without AM/PM default to PM
This commit is contained in:
parent
3a225f002c
commit
0eb5a89d18
@ -55,7 +55,9 @@ class Command:
|
|||||||
h = int(m.group(1))
|
h = int(m.group(1))
|
||||||
mins = 0 if m.group(2) is None else int(m.group(2))
|
mins = 0 if m.group(2) is None else int(m.group(2))
|
||||||
am_pm = '' if m.group(3) is None else m.group(3).lower()
|
am_pm = '' if m.group(3) is None else m.group(3).lower()
|
||||||
if len(am_pm) >= 1 and am_pm[0] == 'p' and h < 12:
|
if am_pm == '' and h < 7:
|
||||||
|
h += 12
|
||||||
|
elif len(am_pm) >= 1 and am_pm[0] == 'p' and h < 12:
|
||||||
h += 12
|
h += 12
|
||||||
elif len(am_pm) >= 1 and am_pm[0] == 'a' and h == 12:
|
elif len(am_pm) >= 1 and am_pm[0] == 'a' and h == 12:
|
||||||
h = 0
|
h = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user