From c940b70c65b1550fe65dbad5841adfe906cf0cdf Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 14 Mar 2015 21:31:42 -0500 Subject: use the new DateTime::start_of_day() and DateTime::start_of_minute() functions. --- src/actions.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/actions.cpp') diff --git a/src/actions.cpp b/src/actions.cpp index 1b665cc..41c7f11 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -143,9 +143,7 @@ void on_calendar_activated(GSimpleAction * /*action*/, g_return_if_fail(t != 0); - // the client gave us a date; remove the HMS component from the resulting DateTime - auto dt = DateTime(t); - dt = dt.add_full (0, 0, 0, -dt.hour(), -dt.minute(), -dt.seconds()); + auto dt = DateTime(t).start_of_day(); static_cast(gself)->set_calendar_date(dt); } -- cgit v1.2.3