diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-19 12:45:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-19 12:45:49 +0100 |
| commit | d1ed2647b9ed99571a33fc40ab2372cb7999bef0 (patch) | |
| tree | f50a721c5ffa8010202531fa3b85c0682f5efcdb /src/local_time.cc | |
| parent | cedab18b03fa06370b78355937be10c104cf0aad (diff) | |
Add some more operators to LocalTime.
Diffstat (limited to 'src/local_time.cc')
| -rw-r--r-- | src/local_time.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/local_time.cc b/src/local_time.cc index 659d5c82..0f87bb49 100644 --- a/src/local_time.cc +++ b/src/local_time.cc @@ -309,6 +309,14 @@ LocalTime::operator< (LocalTime const & other) const bool +LocalTime::operator<=(LocalTime const& other) const +{ + return *this < other || *this == other; +} + + + +bool LocalTime::operator>(LocalTime const & other) const { auto a = as_utc(); @@ -337,6 +345,13 @@ LocalTime::operator>(LocalTime const & other) const bool +LocalTime::operator>=(LocalTime const& other) const +{ + return *this > other || *this == other; +} + + +bool LocalTime::operator!= (LocalTime const & other) const { return !(*this == other); |
