Skip to content

Commit b6081ad

Browse files
author
Richard Jones
committed
add "ago" to intervals in the past [SF#679232]
1 parent bacb902 commit b6081ad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ are given with the most recent entry first.
4242
- added warning filter for "FutureWarning: hex/oct constants > sys.maxint will
4343
return positive values..." (literal 0xffff0000 in portalocker.py)
4444
- fixed ZPT code generating SyntaxWarning for assignment to None
45+
- add "ago" to intervals in the past (sf bug 679232)
4546

4647

4748
2003-??-?? 0.5.6

roundup/date.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: date.py,v 1.40 2002-12-18 00:15:53 richard Exp $
18+
# $Id: date.py,v 1.41 2003-02-07 01:01:25 richard Exp $
1919

2020
__doc__ = """
2121
Date, time and time interval handling.
@@ -461,6 +461,8 @@ def pretty(self):
461461
s = _('1/2 an hour')
462462
else:
463463
s = _('%(number)s/4 hour')%{'number': int(self.minute/15)}
464+
if self.sign < 0:
465+
s = s + _(' ago')
464466
return s
465467

466468
def get_tuple(self):

0 commit comments

Comments
 (0)