diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/local_time.cc | 15 | ||||
| -rw-r--r-- | src/local_time.h | 2 |
2 files changed, 17 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); diff --git a/src/local_time.h b/src/local_time.h index e1baedcc..7c91db3e 100644 --- a/src/local_time.h +++ b/src/local_time.h @@ -157,7 +157,9 @@ public: bool operator== (LocalTime const & other) const; bool operator!= (LocalTime const & other) const; bool operator< (LocalTime const & other) const; + bool operator<=(LocalTime const & other) const; bool operator>(LocalTime const & other) const; + bool operator>=(LocalTime const & other) const; private: friend struct ::local_time_basic_test; |
