Compare commits
No commits in common. "b71c765e3451d576c452b862063b499026137b51" and "9906d3431428065200745bd4b619adbbb981d08e" have entirely different histories.
b71c765e34
...
9906d34314
|
@ -1 +1 @@
|
|||
__version__ = '0.1.52'
|
||||
__version__ = '0.1.51'
|
||||
|
|
|
@ -22,7 +22,7 @@ FORMAT_DATE_HEADER = '%a, %d %b %Y %H:%M:%S GMT'
|
|||
|
||||
def parse_duration(text: str) -> datetime.timedelta:
|
||||
(num_str, unit_str) = text.split(' ')
|
||||
num = float(num_str)
|
||||
num = int(num_str)
|
||||
unit = DATETIME_UNITS[unit_str]
|
||||
return unit * num
|
||||
|
||||
|
@ -78,7 +78,5 @@ def parse_date(text: str) -> datetime.date:
|
|||
return dt.date()
|
||||
if dt := try_parse(text, '%B %d, %Y'):
|
||||
return dt.date()
|
||||
if dt := try_parse(text, '%b %d'):
|
||||
return dt.date()
|
||||
msg = 'Unknown format: ' + text
|
||||
raise RuntimeError(msg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user