Mercurial > p > roundup > code
changeset 1412:e5fb7d4bf251
add "ago" to intervals in the past [SF#679232]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 07 Feb 2003 01:01:25 +0000 |
| parents | b84821c9f966 |
| children | 4ae9d725bec4 |
| files | CHANGES.txt roundup/date.py |
| diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Thu Feb 06 09:40:21 2003 +0000 +++ b/CHANGES.txt Fri Feb 07 01:01:25 2003 +0000 @@ -42,6 +42,7 @@ - added warning filter for "FutureWarning: hex/oct constants > sys.maxint will return positive values..." (literal 0xffff0000 in portalocker.py) - fixed ZPT code generating SyntaxWarning for assignment to None +- add "ago" to intervals in the past (sf bug 679232) 2003-??-?? 0.5.6
--- a/roundup/date.py Thu Feb 06 09:40:21 2003 +0000 +++ b/roundup/date.py Fri Feb 07 01:01:25 2003 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: date.py,v 1.40 2002-12-18 00:15:53 richard Exp $ +# $Id: date.py,v 1.41 2003-02-07 01:01:25 richard Exp $ __doc__ = """ Date, time and time interval handling. @@ -461,6 +461,8 @@ s = _('1/2 an hour') else: s = _('%(number)s/4 hour')%{'number': int(self.minute/15)} + if self.sign < 0: + s = s + _(' ago') return s def get_tuple(self):
