From 70ba611f662990611b4e96093eb0ac5663d4a650 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 23 Apr 2016 12:52:22 -0400 Subject: [PATCH] CmdReportDay: Corrected filter default --- src/commands/CmdReportDay.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdReportDay.cpp b/src/commands/CmdReportDay.cpp index 6cf858c9..c545b271 100644 --- a/src/commands/CmdReportDay.cpp +++ b/src/commands/CmdReportDay.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,10 @@ int CmdReportDay ( Database& database) { auto filter = createFilterIntervalFromCLI (cli); - // TODO If filter is empty, choose 'today'. + + // If filter is empty, choose 'today'. + if (! filter.range.started ()) + filter.range = Range (Datetime ("today"), Datetime ("tomorrow")); auto timeline = createTimelineFromData (rules, database, filter); auto tracked = timeline.tracked (rules);