1.1 --- a/imiptools/data.py Sun Aug 09 22:57:29 2015 +0200
1.2 +++ b/imiptools/data.py Sun Aug 09 23:24:29 2015 +0200
1.3 @@ -332,16 +332,20 @@
1.4 rrule = self.get_value("RRULE")
1.5 parameters = rrule and get_parameters(rrule)
1.6 until = parameters and parameters.get("UNTIL")
1.7 + count = parameters and parameters.get("COUNT")
1.8
1.9 - if not rrule:
1.10 + # Non-recurring periods or constrained recurrences that are not found to
1.11 + # lie beyond the specified datetime.
1.12 +
1.13 + if not rrule or until or count:
1.14 return False
1.15 - elif not until:
1.16 +
1.17 + # Unconstrained recurring periods will always lie beyond the specified
1.18 + # datetime.
1.19 +
1.20 + else:
1.21 return True
1.22
1.23 - dtstart, dtstart_attr = self.get_datetime_item("DTSTART")
1.24 - until = get_datetime(until, dtstart_attr)
1.25 - return until > dt
1.26 -
1.27 # Modification methods.
1.28
1.29 def set_datetime(self, name, dt, tzid=None):