# HG changeset patch # User Paul Boddie # Date 1461084713 -7200 # Node ID df5219c279f57e1ee1128658931a051e33f7f0bd # Parent 313f20241312409f57c6094102b1b640f8743373 Avoid comparing floating datetimes where only date values should be compared. diff -r 313f20241312 -r df5219c279f5 imiptools/period.py --- a/imiptools/period.py Tue Apr 19 18:17:06 2016 +0200 +++ b/imiptools/period.py Tue Apr 19 18:51:53 2016 +0200 @@ -280,8 +280,13 @@ return None d = get_recurrence_start(recurrenceid) dt = get_recurrence_start_point(recurrenceid, self.tzid) - if self.get_start() == d or self.get_start_point() == dt: + + # Compare the start to dates only, using the normalised start datetime + # for comparisons with the start point. + + if not isinstance(d, datetime) and self.get_start() == d or self.get_start_point() == dt: return recurrenceid + return None # Value correction methods.