]> git.tokkee.org Git - roundup.git/commitdiff

Code

add "ago" to intervals in the past (sf bug 679232)
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 7 Feb 2003 01:01:25 +0000 (01:01 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 7 Feb 2003 01:01:25 +0000 (01:01 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1490 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/date.py

index 937b7a5ed7cdc10a1b56b98ef0a85085c6f4fd95..7cec6908976ec31661bd3c68c976192c9de39928 100644 (file)
@@ -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
index 1ac84ea218597f7c99be6b41996e4ab212e4beff..7073238f66424fa2a0db85c34117f806409640ce 100644 (file)
@@ -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):