diff options
author | John Wiegley <johnw@newartisans.com> | 2010-02-04 19:47:16 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-02-05 00:00:29 -0500 |
commit | 9d61d3d621606f0158a048628c866a692465d886 (patch) | |
tree | 797067970e5b81543ece809d03bf5c7170b4a052 /src/item.cc | |
parent | b78e22d52b75cafd63678ee786b1653afffa49e6 (diff) | |
download | fork-ledger-9d61d3d621606f0158a048628c866a692465d886.tar.gz fork-ledger-9d61d3d621606f0158a048628c866a692465d886.tar.bz2 fork-ledger-9d61d3d621606f0158a048628c866a692465d886.zip |
Added actual_date() methods for items
Diffstat (limited to 'src/item.cc')
-rw-r--r-- | src/item.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/item.cc b/src/item.cc index 135fa18f..8d1ba34f 100644 --- a/src/item.cc +++ b/src/item.cc @@ -199,6 +199,9 @@ namespace { value_t get_date(item_t& item) { return item.date(); } + value_t get_actual_date(item_t& item) { + return item.actual_date(); + } value_t get_effective_date(item_t& item) { if (optional<date_t> effective = item.effective_date()) return *effective; @@ -351,6 +354,8 @@ expr_t::ptr_op_t item_t::lookup(const symbol_t::kind_t kind, case 'a': if (name == "actual") return WRAP_FUNCTOR(get_wrapper<&get_actual>); + else if (name == "actual_date") + return WRAP_FUNCTOR(get_wrapper<&get_actual_date>); break; case 'b': |