aboutsummaryrefslogtreecommitdiff
path: root/include/datetime/date-time.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-22 14:28:20 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-22 14:28:20 -0600
commitaad7e86a109aeec75b3772cda20478363f966745 (patch)
tree5049662b13435cc5b422e1194bd617a1089e6fb6 /include/datetime/date-time.h
parente2fd6e620ce7f18c2cbf7c7b353d7cb5f86dce11 (diff)
downloadayatana-indicator-datetime-aad7e86a109aeec75b3772cda20478363f966745.tar.gz
ayatana-indicator-datetime-aad7e86a109aeec75b3772cda20478363f966745.tar.bz2
ayatana-indicator-datetime-aad7e86a109aeec75b3772cda20478363f966745.zip
Alarms is going to need to know when the clock's minute changes. We already have a timer for that in Formatter, so move it from there to Clock and add a corresponding public signal Clock.minuteChanged that both Formatter and Alarms can use. Sync unit tests.
Diffstat (limited to 'include/datetime/date-time.h')
-rw-r--r--include/datetime/date-time.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h
index 145e34e..c2429eb 100644
--- a/include/datetime/date-time.h
+++ b/include/datetime/date-time.h
@@ -49,13 +49,14 @@ public:
std::string format(const std::string& fmt) const;
int day_of_month() const;
int64_t to_unix() const;
- int day_of_year() const;
- gint64 difference(const DateTime& that) const;
bool operator<(const DateTime& that) const;
bool operator!=(const DateTime& that) const;
bool operator==(const DateTime& that) const;
+ static bool is_same_day(const DateTime& a, const DateTime& b);
+ static bool is_same_minute(const DateTime& a, const DateTime& b);
+
private:
std::shared_ptr<GDateTime> m_dt;
};