From 828a1e8bf98365b6266cba95caba08a48b4c745b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 27 Oct 2009 21:34:08 -0400 Subject: Added --actual-dates, for overriding --effective This is so that if someone has --effective in their .ledgerrc, they can force the use of actual dates. --- src/global.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/global.cc') diff --git a/src/global.cc b/src/global.cc index 02c9e79a..e05b2bd8 100644 --- a/src/global.cc +++ b/src/global.cc @@ -419,7 +419,9 @@ void global_scope_t::normalize_report_options(const string& verb) report_t& rep(report()); // jww (2009-02-09): These globals are a hack, but hard to avoid. - item_t::use_effective_date = rep.HANDLED(effective); + item_t::use_effective_date = (rep.HANDLED(effective) && + ! rep.HANDLED(actual_dates)); + rep.session.commodity_pool->keep_base = rep.HANDLED(base); rep.session.commodity_pool->get_quotes = rep.session.HANDLED(download); -- cgit v1.2.3 From 6c9cf1237e1e813c2d56ed51a38cc0685614e8e0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 27 Oct 2009 22:25:19 -0400 Subject: Whitespace change --- src/global.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/global.cc') diff --git a/src/global.cc b/src/global.cc index e05b2bd8..2ce73bae 100644 --- a/src/global.cc +++ b/src/global.cc @@ -434,12 +434,10 @@ void global_scope_t::normalize_report_options(const string& verb) else rep.session.commodity_pool->price_db = none; - if (rep.HANDLED(date_format_)) { + if (rep.HANDLED(date_format_)) set_date_format(rep.HANDLER(date_format_).str().c_str()); - } - if (rep.HANDLED(datetime_format_)) { + if (rep.HANDLED(datetime_format_)) set_datetime_format(rep.HANDLER(datetime_format_).str().c_str()); - } if (rep.HANDLED(start_of_week_)) { if (optional weekday = string_to_day_of_week(rep.HANDLER(start_of_week_).str())) -- cgit v1.2.3