summaryrefslogtreecommitdiff
path: root/src/global.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-21 02:20:08 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-21 02:20:08 -0400
commitf4e13f34580d1b71736f3ea6451d24237ef6fe2c (patch)
tree86f9fbec53b53de19f73d07320217cda9b617c8d /src/global.cc
parent13812346b6ca97ae2f505f08d898e98db907ede6 (diff)
downloadfork-ledger-f4e13f34580d1b71736f3ea6451d24237ef6fe2c.tar.gz
fork-ledger-f4e13f34580d1b71736f3ea6451d24237ef6fe2c.tar.bz2
fork-ledger-f4e13f34580d1b71736f3ea6451d24237ef6fe2c.zip
Added --start-of-week option, used with --weekly
For example, --start-of-week=monday can be used to report weeks that begin on Mondays.
Diffstat (limited to 'src/global.cc')
-rw-r--r--src/global.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/global.cc b/src/global.cc
index e3cfc853..26fa494f 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -368,6 +368,8 @@ 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());
// 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