|
|
|
@ -58,7 +58,7 @@ def timesince(d, now=None):
|
|
|
|
|
# ignore microsecond part of 'd' since we removed it from 'now' |
|
|
|
|
delta = now - (d - datetime.timedelta(0, 0, d.microsecond)) |
|
|
|
|
since = delta.days * 24 * 60 * 60 + delta.seconds |
|
|
|
|
if since <= 0: |
|
|
|
|
if int(since) <= 0: |
|
|
|
|
return 'moments' |
|
|
|
|
|
|
|
|
|
for i, (seconds, name) in enumerate(chunks): |
|
|
|
@ -66,9 +66,6 @@ def timesince(d, now=None):
|
|
|
|
|
if count != 0: |
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
if count < 0: |
|
|
|
|
return '%d milliseconds' % math.floor((now - d).microseconds / 1000) |
|
|
|
|
|
|
|
|
|
s = '%d %s' % (count, name(count)) |
|
|
|
|
if i + 1 < len(chunks): |
|
|
|
|
# Now get the second item |
|
|
|
|