From 6ea0530ca993798cfff4a208c85ad7524c22c8c0 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 7 Feb 2003 01:01:25 +0000 Subject: [PATCH] add "ago" to intervals in the past (sf bug 679232) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1490 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + roundup/date.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 937b7a5..7cec690 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -42,6 +42,7 @@ are given with the most recent entry first. - 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 diff --git a/roundup/date.py b/roundup/date.py index 1ac84ea..7073238 100644 --- a/roundup/date.py +++ b/roundup/date.py @@ -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 @@ class Interval: 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): -- 2.39.5