summaryrefslogtreecommitdiff
path: root/src/global.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-27 22:26:13 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-27 22:26:13 -0400
commit58fb65421829de49a3b27800ce54e093d45f0f41 (patch)
tree18fb188d4bfb45677ec0a660f0b6cd5019601621 /src/global.cc
parent3c30f74931bbe94484da82481eb9d3b788347907 (diff)
parent6c9cf1237e1e813c2d56ed51a38cc0685614e8e0 (diff)
downloadfork-ledger-58fb65421829de49a3b27800ce54e093d45f0f41.tar.gz
fork-ledger-58fb65421829de49a3b27800ce54e093d45f0f41.tar.bz2
fork-ledger-58fb65421829de49a3b27800ce54e093d45f0f41.zip
Merge branch 'next'
Diffstat (limited to 'src/global.cc')
-rw-r--r--src/global.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/global.cc b/src/global.cc
index 02c9e79a..2ce73bae 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);
@@ -432,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<date_time::weekdays> weekday =
string_to_day_of_week(rep.HANDLER(start_of_week_).str()))