web/facet.py
branchstable
changeset 2152 edec2c9055e5
parent 2149 6a631ec5cc71
child 2305 8f6dbe884700
--- 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)