summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-16 18:49:27 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-16 18:49:27 +0100
commit3a926da4cbffe903d138f8df9f5cb33332ff1030 (patch)
treeb090a19c1d59b339c17b65e6d322889d3d76e9c8 /src/report.cc
parent849e4b2fbbfc08f62550145b61d3e2b442777c86 (diff)
downloadledger-3a926da4cbffe903d138f8df9f5cb33332ff1030.tar.gz
ledger-3a926da4cbffe903d138f8df9f5cb33332ff1030.tar.bz2
ledger-3a926da4cbffe903d138f8df9f5cb33332ff1030.zip
When --end is used, set a "terminus" date
This means that final balance valuations (with -V or -X) will be done in terms of the date given to --end, rather than based on the current day. Fixes 647D5DB9-DBBB-47C8-80CE-F3F70E3B0253
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc
index de67708b..fde3365b 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -753,6 +753,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
return MAKE_FUNCTOR(report_t::fn_display_amount);
else if (is_eq(p, "display_total"))
return MAKE_FUNCTOR(report_t::fn_display_total);
+ else if (is_eq(p, "date"))
+ return MAKE_FUNCTOR(report_t::fn_today);
break;
case 'f':
@@ -789,6 +791,10 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
case 'n':
if (is_eq(p, "null"))
return WRAP_FUNCTOR(fn_null);
+#if 0
+ else if (is_eq(p, "now"))
+ return MAKE_FUNCTOR(report_t::fn_now);
+#endif
break;
case 'o':
@@ -868,6 +874,8 @@ expr_t::ptr_op_t report_t::lookup(const string& name)
return MAKE_FUNCTOR(report_t::fn_truncated);
else if (is_eq(p, "total_expr"))
return MAKE_FUNCTOR(report_t::fn_total_expr);
+ else if (is_eq(p, "today"))
+ return MAKE_FUNCTOR(report_t::fn_today);
break;
case 'u':