1.1 --- a/EventAggregatorSupport.py Wed Jul 20 00:53:40 2011 +0200
1.2 +++ b/EventAggregatorSupport.py Sat Jul 23 15:59:27 2011 +0200
1.3 @@ -905,7 +905,14 @@
1.4 # Permit omission of the end of the event by duplicating the start.
1.5
1.6 if self.details.has_key("start") and not self.details.has_key("end"):
1.7 - self.details["end"] = self.details["start"]
1.8 + end = self.details["start"]
1.9 +
1.10 + # Make any end time refer to the day instead.
1.11 +
1.12 + if isinstance(end, DateTime):
1.13 + end = end.as_date()
1.14 +
1.15 + self.details["end"] = end
1.16
1.17 def __repr__(self):
1.18 return "<Event %r %r>" % (self.getSummary(), self.as_limits())
1.19 @@ -1016,10 +1023,14 @@
1.20
1.21 # Use dates for the calendar limits.
1.22
1.23 - if isinstance(calendar_start, Month):
1.24 + if isinstance(calendar_start, Date):
1.25 + pass
1.26 + elif isinstance(calendar_start, Month):
1.27 calendar_start = calendar_start.as_date(1)
1.28
1.29 - if isinstance(calendar_end, Month):
1.30 + if isinstance(calendar_end, Date):
1.31 + pass
1.32 + elif isinstance(calendar_end, Month):
1.33 calendar_end = calendar_end.as_date(-1)
1.34
1.35 resources = []
1.36 @@ -1303,7 +1314,7 @@
1.37 if isinstance(start, DateTime):
1.38 times.add(start)
1.39 else:
1.40 - times.add(start.as_datetime(None, None, None, None))
1.41 + times.add(start.as_start_of_day())
1.42
1.43 if isinstance(end, DateTime):
1.44 times.add(end)
1.45 @@ -1528,6 +1539,9 @@
1.46 def as_datetime(self, hour, minute, second, zone):
1.47 return DateTime(self.as_tuple() + (hour, minute, second, zone))
1.48
1.49 + def as_start_of_day(self):
1.50 + return self.as_datetime(None, None, None, None)
1.51 +
1.52 def as_date(self):
1.53 return self
1.54
2.1 --- a/TO_DO.txt Wed Jul 20 00:53:40 2011 +0200
2.2 +++ b/TO_DO.txt Sat Jul 23 15:59:27 2011 +0200
2.3 @@ -1,11 +1,25 @@
2.4 +Points in Time
2.5 +--------------
2.6 +
2.7 +Events which have identical start and end times might be represented by
2.8 +building a calendar scale that distinguishes between times acting as start
2.9 +times and times acting as end times.
2.10 +
2.11 +Consider making dates convertible to timespans of the form (start of day,
2.12 +start of next day).
2.13 +
2.14 GriCal and External Aggregation
2.15 -------------------------------
2.16
2.17 +Make URL parameterisation robust enough to prevent arbitrary URL fragment
2.18 +insertion.
2.19 +
2.20 Support a linkToEvent method on Event instances, possibly just delegating to
2.21 linkToPage for Wiki events (although event sections could provide anchors for
2.22 -events in Wiki pages).
2.23 +events in Wiki pages). Calendar events would provide their own URL property.
2.24
2.25 -Support caching and proper encoding detection.
2.26 +Support caching and proper encoding detection. Response metadata could be
2.27 +inspected, defaulting to UTF-8 if necessary.
2.28
2.29 Support navigation where the full extent of external events cannot be
2.30 detected.
2.31 @@ -42,6 +56,12 @@
2.32 Map Views
2.33 ---------
2.34
2.35 +Explicit latitude and longitude values (such as the iCalendar GEO property)
2.36 +could be supported.
2.37 +
2.38 +Other projections might be supported. This would be necessary for various
2.39 +retrieved map images.
2.40 +
2.41 Dynamic images obtained from other sites or generated locally might provide some
2.42 enhancements to the map view. For example, a weather/radar image might show the
2.43 cloud or rain forecast either for the current situation or, if forecasts are