# HG changeset patch # User Paul Boddie # Date 1237854096 -3600 # Node ID b7d08f3b4ff967380e7c8c76f8e8004f37e6ffa0 # Parent f398ad4b5d369d2761a1d04d8f167f9a34a12587 Permit reversed calendars when scheduling events. Insist on a span when providing navigation. diff -r f398ad4b5d36 -r b7d08f3b4ff9 EventAggregatorSupport.py --- a/EventAggregatorSupport.py Tue Mar 24 01:05:50 2009 +0100 +++ b/EventAggregatorSupport.py Tue Mar 24 01:21:36 2009 +0100 @@ -247,6 +247,11 @@ month of an event within the window of interest. """ + # Re-order the window, if appropriate. + + if calendar_start is not None and calendar_end is not None and calendar_start > calendar_end: + calendar_start, calendar_end = calendar_end, calendar_start + events = [] shown_events = {} all_shown_events = [] diff -r f398ad4b5d36 -r b7d08f3b4ff9 macros/EventAggregator.py --- a/macros/EventAggregator.py Tue Mar 24 01:05:50 2009 +0100 +++ b/macros/EventAggregator.py Tue Mar 24 01:21:36 2009 +0100 @@ -145,6 +145,11 @@ calendar_start = new_calendar_start calendar_end = new_calendar_end + # Insist on a span in order to ensure start and end months. + + if span is None: + span = 1 + # Calculate the window of interest. if span is not None: