Skip to content

Commit

Permalink
Update equality
Browse files Browse the repository at this point in the history
  • Loading branch information
atuonufure committed Dec 20, 2023
1 parent e1bb7a3 commit 0208eb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions fhirpathpy/engine/invocations/equality.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def lt(ctx, a, b):
if isinstance(a0, nodes.FP_Type):
if (
isinstance(a0, nodes.FP_TimeBase)
and a0.compare(b0) == 0
and a0.compare(b0) is None
and a0._precision != b0._precision
):
return None
Expand All @@ -204,7 +204,7 @@ def gt(ctx, a, b):
if isinstance(a0, nodes.FP_Type):
if (
isinstance(a0, nodes.FP_TimeBase)
and a0.compare(b0) == 0
and a0.compare(b0) is None
and a0._precision != b0._precision
):
return None
Expand All @@ -226,7 +226,7 @@ def lte(ctx, a, b):
if isinstance(a0, nodes.FP_Type):
if (
isinstance(a0, nodes.FP_TimeBase)
and a0.compare(b0) == 0
and a0.compare(b0) is None
and a0._precision != b0._precision
):
return None
Expand All @@ -248,7 +248,7 @@ def gte(ctx, a, b):
if isinstance(a0, nodes.FP_Type):
if (
isinstance(a0, nodes.FP_TimeBase)
and a0.compare(b0) == 0
and a0.compare(b0) is None
and a0._precision != b0._precision
):
return None
Expand Down
2 changes: 1 addition & 1 deletion fhirpathpy/engine/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def compare(self, otherDateTime):
return 1
if normalized_thisdt_list[i] < normalized_otherdt_list[i]:
return -1
return 0
return None

thisDateTimeInt = self._getDateTimeInt()
otherDateTimeInt = otherDateTime._getDateTimeInt()
Expand Down

0 comments on commit 0208eb5

Please sign in to comment.