--- a/goa/skel/views.py Thu Apr 30 17:35:11 2009 +0200
+++ b/goa/skel/views.py Thu Apr 30 17:35:43 2009 +0200
@@ -1,7 +1,7 @@
# custom application views
-from calendar import monthrange
from datetime import date
+from cubicweb.utils import last_day
from cubicweb.web.views import baseviews, boxes, calendar
from cubicweb.web.htmlwidgets import BoxLink, BoxWidget
@@ -36,7 +36,7 @@
box = BoxWidget(_('Blog archives'), id=self.id)
for year, month in blogmonths:
firstday = date(year, month, 1)
- lastday = date(year, month, monthrange(year, month)[1])
+ lastday = last_day(firstday)
rql = ('Any B WHERE B is BlogEntry, B creation_date >= "%s", B creation_date <= "%s"'
% (firstday.strftime('%Y-%m-%d'), lastday.strftime('%Y-%m-%d')))
url = self.build_url(rql=rql)