Skip to content

Commit

Permalink
Add greater
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Aug 27, 2024
1 parent 490b4cf commit c2366cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/DateTimeUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ using {
} for Months global;
using {
_timestampLess as <,
_timestampGreater as >,
_timestampEqual as ==,
_timestampNotEqual as !=
} for Timestamp global;
Expand Down Expand Up @@ -71,6 +72,10 @@ function _timestampLess(Timestamp left, Timestamp right) pure returns (bool resu
return Timestamp.unwrap(left) < Timestamp.unwrap(right);
}

function _timestampGreater(Timestamp left, Timestamp right) pure returns (bool result) {
return Timestamp.unwrap(left) > Timestamp.unwrap(right);
}

function _timestampEqual(Timestamp left, Timestamp right) pure returns (bool result) {
return Timestamp.unwrap(left) == Timestamp.unwrap(right);
}
Expand Down

0 comments on commit c2366cd

Please sign in to comment.