# HG changeset patch # User Paul Boddie # Date 1423428770 -3600 # Node ID cc6138b8d1728a7dabc965dcc5b0cf56dab299fe # Parent da7fd03fd2ab2402fbc396a30ecebd800068eca8 Return None from get_datetime if the incoming value is a false value. diff -r da7fd03fd2ab -r cc6138b8d172 imiptools/dates.py --- a/imiptools/dates.py Sun Feb 08 20:18:08 2015 +0100 +++ b/imiptools/dates.py Sun Feb 08 21:52:50 2015 +0100 @@ -132,6 +132,9 @@ the 'attr' mapping (if specified) to control the conversion. """ + if not value: + return None + if len(value) > 9 and (not attr or attr.get("VALUE") in (None, "DATE-TIME")): m = match_datetime_icalendar(value) if m: