oops stable
authorFlorent <florent@secondweb.fr>
Tue, 23 Jun 2009 16:31:15 +0200
branchstable
changeset 2152 edec2c9055e5
parent 2151 d653e4c944d7
child 2153 d42d1eaefcdd
child 2154 558079860667
oops
web/facet.py
--- a/web/facet.py	Tue Jun 23 15:52:52 2009 +0200
+++ b/web/facet.py	Tue Jun 23 16:31:15 2009 +0200
@@ -10,7 +10,7 @@
 
 from itertools import chain
 from copy import deepcopy
-from datetime import date, datetime
+from datetime import date, datetime, timedelta
 
 from logilab.mtconverter import html_escape
 
@@ -688,7 +688,7 @@
 
     def round_max_value(self, d):
         'round to upper value to avoid filtering out the max value'
-        return datetime(d.year, d.month, d.day + 1)
+        return datetime(d.year, d.month, d.day) + timedelta(days=1)
 
     def __init__(self, facet, minvalue, maxvalue):
         maxvalue = self.round_max_value(maxvalue)