[uilib] don't print timedeltas between 0 and 23h as negative (closes #2236352) stable
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 13 Mar 2012 14:20:16 +0100
branchstable
changeset 8301 1385e05afe52
parent 8300 87c72dccf7b9
child 8302 7965f1e9f399
[uilib] don't print timedeltas between 0 and 23h as negative (closes #2236352)
uilib.py
--- a/uilib.py	Wed Mar 07 16:16:44 2012 +0100
+++ b/uilib.py	Tue Mar 13 14:20:16 2012 +0100
@@ -108,7 +108,7 @@
     elif value.days > 2 or value.days < -2:
         return req._('%d days') % int(value.days)
     else:
-        minus = 1 if value.days > 0 else -1
+        minus = 1 if value.days >= 0 else -1
         if value.seconds > 3600:
             return req._('%d hours') % (int(value.seconds // 3600) * minus)
         elif value.seconds >= 120: