summaryrefslogtreecommitdiff
path: root/src/report.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-14 17:14:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-14 17:14:56 -0400
commitf3bedb88b24ae8b2047ad86e57b161265c2812f5 (patch)
treee6e5954f40a09e7fd002f242523c1eb0f318b397 /src/report.h
parent0c699e4d57fe91fa04c4c2f23f9c2f2a6a5da582 (diff)
parent63b4bdaecff5a865bff22e8e7914bef6ab46fa6b (diff)
downloadfork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.tar.gz
fork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.tar.bz2
fork-ledger-f3bedb88b24ae8b2047ad86e57b161265c2812f5.zip
Merge branch 'next'
Diffstat (limited to 'src/report.h')
-rw-r--r--src/report.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/report.h b/src/report.h
index 44aed03b..6176c19b 100644
--- a/src/report.h
+++ b/src/report.h
@@ -393,7 +393,7 @@ public:
OPTION_(report_t, begin_, DO_(args) { // -b
date_interval_t interval(args.get<string>(1));
- optional<date_t> begin = interval.begin(parent->session.current_year);
+ optional<date_t> begin = interval.begin();
if (! begin)
throw_(std::invalid_argument,
_("Could not determine beginning of period '%1'")
@@ -543,8 +543,9 @@ public:
OPTION_(report_t, end_, DO_(args) { // -e
date_interval_t interval(args.get<string>(1));
// Use begin() here so that if the user says --end=2008, we end on
- // 2008/01/01 instead of 2009/01/01 (which is what end() would return).
- optional<date_t> end = interval.begin(parent->session.current_year);
+ // 2008/01/01 instead of 2009/01/01 (which is what end() would
+ // return).
+ optional<date_t> end = interval.begin();
if (! end)
throw_(std::invalid_argument,
_("Could not determine end of period '%1'")
@@ -665,13 +666,12 @@ public:
OPTION_(report_t, now_, DO_(args) {
date_interval_t interval(args.get<string>(1));
- optional<date_t> begin = interval.begin(parent->session.current_year);
+ optional<date_t> begin = interval.begin();
if (! begin)
throw_(std::invalid_argument,
_("Could not determine beginning of period '%1'")
<< args.get<string>(1));
ledger::epoch = parent->terminus = datetime_t(*begin);
- parent->session.current_year = ledger::epoch->date().year();
});
OPTION__