Fix matching of date property
This commit is contained in:
parent
571567a4ec
commit
9909454761
@ -410,9 +410,12 @@ def visit_time_ranges(vobject_item, child_name, range_fn, infinity_fn):
|
|||||||
# Match a property
|
# Match a property
|
||||||
child = getattr(vobject_item, child_name.lower())
|
child = getattr(vobject_item, child_name.lower())
|
||||||
if isinstance(child, date):
|
if isinstance(child, date):
|
||||||
range_fn(child, child + DAY, False)
|
child_is_datetime = isinstance(child, datetime)
|
||||||
elif isinstance(child, datetime):
|
child = date_to_datetime(child)
|
||||||
range_fn(child, child + SECOND, False)
|
if child_is_datetime:
|
||||||
|
range_fn(child, child + SECOND, False)
|
||||||
|
else:
|
||||||
|
range_fn(child, child + DAY, False)
|
||||||
|
|
||||||
|
|
||||||
def text_match(vobject_item, filter_, child_name, ns, attrib_name=None):
|
def text_match(vobject_item, filter_, child_name, ns, attrib_name=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user