1.1 --- a/EventAggregatorSupport.py Thu Apr 07 23:44:06 2011 +0200
1.2 +++ b/EventAggregatorSupport.py Fri Apr 08 00:42:20 2011 +0200
1.3 @@ -515,7 +515,7 @@
1.4 # Labels which may well be quoted.
1.5
1.6 elif term in ("title", "summary", "description", "location"):
1.7 - desc = getSimpleWikiText(desc)
1.8 + desc = getSimpleWikiText(desc.strip())
1.9
1.10 if desc is not None:
1.11
1.12 @@ -1557,6 +1557,11 @@
1.13 self.start = start
1.14 self.end = end
1.15
1.16 + # NOTE: Should perhaps catch ambiguous time problems elsewhere.
1.17 +
1.18 + if self.ambiguous() and start > end:
1.19 + self.start, self.end = end, start
1.20 +
1.21 def __repr__(self):
1.22 return "%s(%r, %r)" % (self.__class__.__name__, self.start, self.end)
1.23
1.24 @@ -1569,6 +1574,9 @@
1.25 def as_limits(self):
1.26 return self.start, self.end
1.27
1.28 + def ambiguous(self):
1.29 + return self.start.ambiguous() or self.end.ambiguous()
1.30 +
1.31 def convert(self, resolution):
1.32 return Timespan(*map(self._get_converter(resolution), self.as_limits()))
1.33