From 273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 16 Mar 2015 21:07:54 +0100 Subject: add DateTime::end_of_month(), DateTime::end_of_day(). Add unit tests for them. --- tests/test-alarm-queue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test-alarm-queue.cpp') diff --git a/tests/test-alarm-queue.cpp b/tests/test-alarm-queue.cpp index 0492539..3fdf787 100644 --- a/tests/test-alarm-queue.cpp +++ b/tests/test-alarm-queue.cpp @@ -69,7 +69,7 @@ protected: { const auto now = m_state->clock->localtime(); const auto tomorrow_begin = now.add_days(1).start_of_day(); - const auto tomorrow_end = tomorrow_begin.add_full(0, 0, 1, 0, 0, -1); + const auto tomorrow_end = tomorrow_begin.end_of_day(); Appointment a1; // an alarm clock appointment a1.color = "red"; @@ -81,7 +81,7 @@ protected: a1.end = tomorrow_end; const auto ubermorgen_begin = now.add_days(2).start_of_day(); - const auto ubermorgen_end = ubermorgen_begin.add_full(0, 0, 1, 0, 0, -1); + const auto ubermorgen_end = ubermorgen_begin.end_of_day(); Appointment a2; // a non-alarm appointment a2.color = "green"; -- cgit v1.2.3