id summary reporter owner description type status priority component severity resolution keywords cc release 11656 Datetime calculation breaks calendar at last day(s)-of-month Steffen Hoffmann "Today, 31-Mar-2014, some colleagues of mine reported a broken wiki calendar: {{{#!python 2014-03-31 09:41:52,378 Trac[formatter] ERROR: Macro WikiTicketCalendar(None) failed: Traceback (most recent call last): File ""/local/lib/python2.7/site-packages/Trac-1.1.1dev_r11359-py2.7.egg/trac/wiki/formatter.py"", line 765, in _macro_formatter return macro.ensure_inline(macro.process(args)) File ""/local/lib/python2.7/site-packages/Trac-1.1.1dev_r11359-py2.7.egg/trac/wiki/formatter.py"", line 356, in process text = self.processor(text) File ""/local/lib/python2.7/site-packages/Trac-1.1.1dev_r11359-py2.7.egg/trac/wiki/formatter.py"", line 343, in _macro_processor text) File ""build/bdist.linux-i686/egg/wikicalendar/macros.py"", line 402, in expand_macro today = now.replace(month=month) ValueError: day is out of range for month }}} In general it happens, when you jump to months with less days then your current day-of-month. February is broken at any 30. and 31. of all other months, and in most years even on each 29th day-of-month." defect new normal WikiCalendarMacro normal calendar calculation out-of-range 0.11