diff --git a/custom_json_diff/custom_diff_classes.py b/custom_json_diff/custom_diff_classes.py index d68ffed..94ef5e8 100644 --- a/custom_json_diff/custom_diff_classes.py +++ b/custom_json_diff/custom_diff_classes.py @@ -432,11 +432,11 @@ def compare_bom_refs(v1: str, v2: str) -> bool: def compare_date(dt1: str, dt2: str, comparator: str): """Compares two dates""" - if dt1 == dt2 or (not dt1 and not dt2): + if not dt1 and not dt2: return True try: - date_1 = datetime.fromisoformat(dt1) - date_2 = datetime.fromisoformat(dt2) + date_1 = datetime.fromisoformat(dt1).date() + date_2 = datetime.fromisoformat(dt2).date() match comparator: case "<": return date_1 < date_2 diff --git a/pyproject.toml b/pyproject.toml index 25c37d3..bcc91fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "custom-json-diff" -version = "1.5.5" +version = "1.5.6" description = "Custom JSON and CycloneDx BOM diffing and comparison tool." authors = [ { name = "Caroline Russell", email = "caroline@appthreat.dev" },