aboutsummaryrefslogtreecommitdiff
path: root/src/date-time.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-18 10:17:55 -0500
committerRobert Tari <robert@tari.in>2021-07-05 00:44:01 +0200
commite47d49aca4da2d97c06acccc967abdf5698b044d (patch)
treed3edead4a7396f959706242fed978f6bc0a9c238 /src/date-time.cpp
parent179bbad3a5c1c12abb36dc1c3702cb50b6be8f2e (diff)
downloadayatana-indicator-datetime-e47d49aca4da2d97c06acccc967abdf5698b044d.tar.gz
ayatana-indicator-datetime-e47d49aca4da2d97c06acccc967abdf5698b044d.tar.bz2
ayatana-indicator-datetime-e47d49aca4da2d97c06acccc967abdf5698b044d.zip
get event selection up-to-date with the spec, including showing in-progress events. add unit tests to cover event priority and display order.
Diffstat (limited to 'src/date-time.cpp')
-rw-r--r--src/date-time.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/date-time.cpp b/src/date-time.cpp
index 169426c..911fb7a 100644
--- a/src/date-time.cpp
+++ b/src/date-time.cpp
@@ -245,11 +245,21 @@ bool DateTime::operator<(const DateTime& that) const
return g_date_time_compare(get(), that.get()) < 0;
}
+bool DateTime::operator>(const DateTime& that) const
+{
+ return g_date_time_compare(get(), that.get()) > 0;
+}
+
bool DateTime::operator<=(const DateTime& that) const
{
return g_date_time_compare(get(), that.get()) <= 0;
}
+bool DateTime::operator>=(const DateTime& that) const
+{
+ return g_date_time_compare(get(), that.get()) >= 0;
+}
+
bool DateTime::operator!=(const DateTime& that) const
{
// return true if this isn't set, or if it's not equal