1.1 --- a/imiptools/data.py Wed May 13 17:52:31 2015 +0200
1.2 +++ b/imiptools/data.py Wed May 13 18:31:12 2015 +0200
1.3 @@ -433,6 +433,11 @@
1.4 parameters = get_parameters(rrule)
1.5 periods = []
1.6
1.7 + until = parameters.get("UNTIL")
1.8 + if until:
1.9 + window_end = min(to_timezone(get_datetime(until, dtstart_attr), tzid), window_end)
1.10 + inclusive = True
1.11 +
1.12 for start in selector.materialise(dtstart, window_end, parameters.get("COUNT"), parameters.get("BYSETPOS"), inclusive):
1.13 start = to_timezone(datetime(*start), tzid)
1.14 end = start + duration