Skip to content
Snippets Groups Projects
Commit 1c93cd9f authored by Daniel Dent's avatar Daniel Dent Committed by GitHub
Browse files

Add support for durations in minutes

parent 291628d4
No related branches found
No related tags found
No related merge requests found
...@@ -64,11 +64,12 @@ class Config(object): ...@@ -64,11 +64,12 @@ class Config(object):
if isinstance(value, int) or isinstance(value, long): if isinstance(value, int) or isinstance(value, long):
return value return value
second = 1000 second = 1000
hour = 60 * 60 * second minute = 60 * second
hour = 60 * minute
day = 24 * hour day = 24 * hour
week = 7 * day week = 7 * day
year = 365 * day year = 365 * day
sizes = {"s": second, "h": hour, "d": day, "w": week, "y": year} sizes = {"s": second, "m": minute, "h": hour, "d": day, "w": week, "y": year}
size = 1 size = 1
suffix = value[-1] suffix = value[-1]
if suffix in sizes: if suffix in sizes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment