From dda7c3a58ab73a567e26f160ffa0b87bacb7db50 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 23 Mar 2009 01:22:26 -0400 Subject: Rewrote the date interval parser/stepper The new implementation uses boost::gregorian::date_duration objects, rather than manually stepping. --- src/global.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/global.cc') diff --git a/src/global.cc b/src/global.cc index 3b491c0e..a258d0bb 100644 --- a/src/global.cc +++ b/src/global.cc @@ -387,8 +387,11 @@ void global_scope_t::normalize_report_options(const string& verb) output_datetime_format = rep.HANDLER(date_format_).str() + " %H:%M:%S"; output_date_format = rep.HANDLER(date_format_).str(); } - if (rep.HANDLED(start_of_week_)) - start_of_week = string_to_day_of_week(rep.HANDLER(start_of_week_).str()); + if (rep.HANDLED(start_of_week_)) { + if (optional weekday = + string_to_day_of_week(rep.HANDLER(start_of_week_).str())) + start_of_week = *weekday; + } // jww (2008-08-14): This code really needs to be rationalized away for 3.0. // I might be able to do it with command objects, like register_t, which -- cgit v1.2.3