1.1 --- a/EventAggregatorSupport.py Fri Oct 22 01:13:28 2010 +0200
1.2 +++ b/EventAggregatorSupport.py Fri Oct 22 22:06:18 2010 +0200
1.3 @@ -849,7 +849,9 @@
1.4
1.5 return min(first, last), last
1.6
1.7 -# NOTE: Support coverage using times within days.
1.8 +# NOTE: Support coverage using times within days. This will involve timespan
1.9 +# NOTE: objects which can be compared in such a way that set operations will be
1.10 +# NOTE: able to detect overlapping periods.
1.11
1.12 def getCoverage(start, end, events):
1.13
2.1 --- a/macros/EventAggregator.py Fri Oct 22 01:13:28 2010 +0200
2.2 +++ b/macros/EventAggregator.py Fri Oct 22 22:06:18 2010 +0200
2.3 @@ -66,9 +66,23 @@
2.4 self.next_set_end = last.month_update(self.number_of_months)
2.5
2.6 def getQualifiedParameterName(self, argname):
2.7 +
2.8 + "Return the 'argname' qualified using the calendar name."
2.9 +
2.10 return EventAggregatorSupport.getQualifiedParameterName(self.calendar_name, argname)
2.11
2.12 def getMonthYearQueryString(self, argname, year_month, prefix=1):
2.13 +
2.14 + """
2.15 + Return a query string fragment for the given 'argname', referring to the
2.16 + month given by the specified 'year_month' object, appropriate for this
2.17 + calendar.
2.18 +
2.19 + If 'prefix' is specified and set to a false value, the parameters in the
2.20 + query string will not be calendar-specific, but could be used with the
2.21 + summary action.
2.22 + """
2.23 +
2.24 if year_month is not None:
2.25 year, month = year_month.as_tuple()
2.26 month_argname = "%s-month" % argname
2.27 @@ -81,6 +95,17 @@
2.28 return ""
2.29
2.30 def getMonthQueryString(self, argname, month, prefix=1):
2.31 +
2.32 + """
2.33 + Return a query string fragment for the given 'argname', referring to the
2.34 + month given by the specified 'month' value, appropriate for this
2.35 + calendar.
2.36 +
2.37 + If 'prefix' is specified and set to a false value, the parameters in the
2.38 + query string will not be calendar-specific, but could be used with the
2.39 + summary action.
2.40 + """
2.41 +
2.42 if month is not None:
2.43 if prefix:
2.44 argname = self.getQualifiedParameterName(argname)
2.45 @@ -89,6 +114,13 @@
2.46 return ""
2.47
2.48 def getNavigationLink(self, start, end, mode=None):
2.49 +
2.50 + """
2.51 + Return a query string fragment for navigation to a view showing months
2.52 + from 'start' to 'end' inclusive, with the optional 'mode' indicating the
2.53 + view style.
2.54 + """
2.55 +
2.56 return "%s&%s&%s=%s" % (
2.57 self.getMonthQueryString("start", start),
2.58 self.getMonthQueryString("end", end),