# HG changeset patch # User Paul Boddie # Date 1426022885 -3600 # Node ID 78e3e1d6a6279bc44903824c414fdd01526040ea # Parent 16e7fcd06b42b3eb0d368a92ed2ac3c2ef00973c Fixed multiple day events where no other events occurred on coincident days. diff -r 16e7fcd06b42 -r 78e3e1d6a627 imiptools/period.py --- a/imiptools/period.py Tue Mar 10 22:11:50 2015 +0100 +++ b/imiptools/period.py Tue Mar 10 22:28:05 2015 +0100 @@ -314,7 +314,16 @@ # are active and where no such slot already exists. if this_date != current_date: - current_date = this_date + + # Fill in days where events remain active. + + if current_date: + current_date += timedelta(1) + while current_date < this_date: + new_slots.append((get_start_of_day(current_date, tzid), previously_active)) + current_date += timedelta(1) + else: + current_date = this_date # Add any continuing periods.