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-snap.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/test-snap.cpp') diff --git a/tests/test-snap.cpp b/tests/test-snap.cpp index e7161d3..3dd4501 100644 --- a/tests/test-snap.cpp +++ b/tests/test-snap.cpp @@ -109,10 +109,9 @@ protected: appt.url = "alarm:///hello-world"; appt.uid = "D4B57D50247291478ED31DED17FF0A9838DED402"; appt.type = Appointment::EVENT; - auto begin = DateTime::Local(2014,12,25,0,0,0); - auto end = begin.add_full(0,0,1,0,0,-1); - appt.begin = begin; - appt.end = end; + const auto christmas = DateTime::Local(2015,12,25,0,0,0); + appt.begin = christmas.start_of_day(); + appt.end = christmas.end_of_day(); service = dbus_test_service_new(nullptr); -- cgit v1.2.3