[CMF-checkins] CVS: CMF/CMFCalendar - CalendarTool.py:1.5
Sidnei da Silva
sidnei@x3ng.com.br
Fri, 16 Aug 2002 00:53:13 -0400
Update of /cvs-repository/CMF/CMFCalendar
In directory cvs.zope.org:/tmp/cvs-serv14309
Modified Files:
CalendarTool.py
Log Message:
Fixing a bug where events were not showing on the last day of the month.
=== CMF/CMFCalendar/CalendarTool.py 1.4 => 1.5 ===
--- CMF/CMFCalendar/CalendarTool.py:1.4 Sat Aug 3 22:31:30 2002
+++ CMF/CMFCalendar/CalendarTool.py Fri Aug 16 00:53:13 2002
@@ -124,9 +124,12 @@
""" given a year and month return a list of days that have events """
first_date=DateTime(str(month)+'/1/'+str(year))
last_day=calendar.monthrange(year, month)[1]
- last_date=DateTime(str(month)+'/'+str(last_day)+'/'+str(year))
-
- query=self.portal_catalog(Type=self.calendar_types,
+ ## This line was cropping the last day of the month out of the
+ ## calendar when doing the query
+ ## last_date=DateTime(str(month)+'/'+str(last_day)+'/'+str(year))
+ last_date=first_date + last_day
+
+ query=self.portal_catalog(Type=self.calendar_types,
review_state='published',
start=(first_date, last_date),
start_usage='range:min:max',