Skip to content

Commit

Permalink
fix: fixed comparison with partial dates
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Jul 18, 2024
1 parent 844dc58 commit 569aa18
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ else if (a instanceof byte[] && b instanceof byte[])
return compareBytes((byte[]) a, (byte[]) b);
else if (a instanceof Map && b instanceof Map)
return CollectionUtils.compare((Map) a, (Map) b);
else if (DateUtils.isDate(a) || DateUtils.isDate(b))
return DateUtils.dateTimeToTimestamp(a, ChronoUnit.NANOS).compareTo(DateUtils.dateTimeToTimestamp(b, ChronoUnit.NANOS));
return ((Comparable<Object>) a).compareTo(b);
}

Expand Down

0 comments on commit 569aa18

Please sign in to comment.