Improved usability
This commit is contained in:
@@ -162,14 +162,16 @@ def add_duration(tid, duration):
|
|||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
def in_a_while(*args):
|
def in_a_while(days=0, seconds=0, microseconds=0, milliseconds=0,
|
||||||
|
minutes=0, hours=0, weeks=0):
|
||||||
"""
|
"""
|
||||||
format of timedelta:
|
format of timedelta:
|
||||||
timedelta([days[, seconds[, microseconds[, milliseconds[,
|
timedelta([days[, seconds[, microseconds[, milliseconds[,
|
||||||
minutes[, hours[, weeks]]]]]]])
|
minutes[, hours[, weeks]]]]]]])
|
||||||
"""
|
"""
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
t = timedelta(*args)
|
t = timedelta(*[days,seconds,microseconds,milliseconds,minutes,
|
||||||
|
hours,weeks])
|
||||||
soon = now + t
|
soon = now + t
|
||||||
return soon.strftime(TIME_FORMAT)
|
return soon.strftime(TIME_FORMAT)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user