Improved usability

This commit is contained in:
Roland Hedberg
2009-11-06 19:41:36 +01:00
parent c571ece8a9
commit e8a2abf8cf

View File

@@ -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:
timedelta([days[, seconds[, microseconds[, milliseconds[,
minutes[, hours[, weeks]]]]]]])
"""
now = datetime.now()
t = timedelta(*args)
t = timedelta(*[days,seconds,microseconds,milliseconds,minutes,
hours,weeks])
soon = now + t
return soon.strftime(TIME_FORMAT)