diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-03-14 21:31:42 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-03-14 21:31:42 -0500 |
commit | c940b70c65b1550fe65dbad5841adfe906cf0cdf (patch) | |
tree | 141b128f526f719b09069e5b06e2ee0c9678bea7 /src/planner-month.cpp | |
parent | db5b700c7c116c73283019b3fbf823a23639a405 (diff) | |
download | ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.tar.gz ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.tar.bz2 ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.zip |
use the new DateTime::start_of_day() and DateTime::start_of_minute() functions.
Diffstat (limited to 'src/planner-month.cpp')
-rw-r--r-- | src/planner-month.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/planner-month.cpp b/src/planner-month.cpp index 5920daa..fd8a568 100644 --- a/src/planner-month.cpp +++ b/src/planner-month.cpp @@ -32,12 +32,7 @@ MonthPlanner::MonthPlanner(const std::shared_ptr<RangePlanner>& range_planner, m_range_planner(range_planner) { month().changed().connect([this](const DateTime& m){ - auto month_begin = m.add_full(0, // no years - 0, // no months - -(m.day_of_month()-1), - -m.hour(), - -m.minute(), - -m.seconds()); + auto month_begin = m.start_of_day().add_full(0, 0, -(m.day_of_month()-1), 0, 0, 0); auto month_end = month_begin.add_full(0, 1, 0, 0, 0, -0.1); g_debug("PlannerMonth %p setting calendar month range: [%s..%s]", this, month_begin.format("%F %T").c_str(), month_end.format("%F %T").c_str()); m_range_planner->range().set(std::pair<DateTime,DateTime>(month_begin,month_end)); |