diff --git a/src/Rules.cpp b/src/Rules.cpp index 604cc3ad..5113a51f 100644 --- a/src/Rules.cpp +++ b/src/Rules.cpp @@ -90,9 +90,6 @@ Rules::Rules () // 'summary' report. {"reports.summary.holidays", "yes"}, - // 'gaps' report. - {"reports.gaps.range", ":day"}, - // Enough of a theme to make the charts work. {"theme.description", "Built-in default"}, {"theme.colors.exclusion", "gray8 on gray4"}, diff --git a/src/commands/CmdGaps.cpp b/src/commands/CmdGaps.cpp index 453c5e18..971bf082 100644 --- a/src/commands/CmdGaps.cpp +++ b/src/commands/CmdGaps.cpp @@ -39,15 +39,13 @@ int CmdGaps ( { const bool verbose = rules.getBoolean ("verbose"); - // If filter is empty, choose 'today'. - auto filter = cli.getFilter (); - if (! filter.is_started ()) - { - if (rules.has ("reports.gaps.range")) - expandIntervalHint (rules.get ("reports.gaps.range"), filter); - else - filter.setRange (Datetime ("today"), Datetime ("tomorrow")); - } + auto default_hint = rules.get ("reports.range", "day"); + auto report_hint = rules.get ("reports.gaps.range", default_hint); + + Range default_range = {}; + expandIntervalHint (":" + report_hint, default_range); + + auto filter = cli.getFilter (default_range); // Is the :blank hint being used? bool blank = cli.getHint ("blank", false);