From 3f4d409f21bbb1f79f149a5ee66dcddaa505ddb1 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 21:08:47 -0500 Subject: decouple the planner's states; need three separate sets: upcoming-now (for alarms in the current time), upcoming-calendar (to show events coming from the selected calendar date), and calendar-month (all the appointments in the month displayed in the menu). --- include/datetime/date-time.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/datetime/date-time.h') diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h index b054a1f..f861c2e 100644 --- a/include/datetime/date-time.h +++ b/include/datetime/date-time.h @@ -36,6 +36,8 @@ class DateTime { public: static DateTime NowLocal(); + static DateTime Local(int years, int months, int days, int hours, int minutes, int seconds); + explicit DateTime(time_t t); explicit DateTime(GDateTime* in=nullptr); DateTime& operator=(GDateTime* in); @@ -48,7 +50,10 @@ public: GDateTime* operator()() const {return get();} std::string format(const std::string& fmt) const; + void ymd(int& year, int& month, int& day) const; int day_of_month() const; + int hour() const; + int minute() const; double seconds() const; int64_t to_unix() const; -- cgit v1.2.3