# HG changeset patch # User Paul Boddie # Date 1265325567 -3600 # Node ID d1d38c393e69394074f41d7d882e86c0aee3f722 # Parent 1371711798d651f22c3eb0cea0b47f91c9d63d6c Added date swapping to fix incorrect date ordering. diff -r 1371711798d6 -r d1d38c393e69 README.txt --- a/README.txt Thu Feb 04 21:55:26 2010 +0100 +++ b/README.txt Fri Feb 05 00:19:27 2010 +0100 @@ -163,7 +163,9 @@ * Added support for multiple events on a single event page. * Introduced EventPage and Event abstractions in order to better support new features. - * Introduced basic and advanced modes to the EventAggregatorNewEvent action. + * Introduced basic and advanced modes to the EventAggregatorNewEvent action, + along with date swapping to correct cases where the start is given as + being later than the end of an event. * Fixed the "download this calendar" and "subscribe to this calendar" links by propagating the "raw" calendar start and end values within the macro. These links should yield events only within the period defined for a diff -r 1371711798d6 -r d1d38c393e69 actions/EventAggregatorNewEvent.py --- a/actions/EventAggregatorNewEvent.py Thu Feb 04 21:55:26 2010 +0100 +++ b/actions/EventAggregatorNewEvent.py Fri Feb 05 00:19:27 2010 +0100 @@ -270,6 +270,11 @@ start_date = self.make_date_string(start_year, start_month, start_day) end_date = self.make_date_string(end_year, end_month, end_day) + # An elementary date ordering check. + + if start_date > end_date: + start_date, end_date = end_date, start_date + # Copy the template. page = PageEditor(request, template)