diff options
Diffstat (limited to 'src/global.cc')
-rw-r--r-- | src/global.cc | 7 |
1 files changed, 5 insertions, 2 deletions
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<date_time::weekdays> 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 |