diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-11 21:32:18 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-11 21:32:32 -0500 |
commit | 67c9cf134d1403657c766e72b96d692a7d538f65 (patch) | |
tree | cd72247ddf240746b524c8fecf6d10f8667b37e4 /src/item.h | |
parent | c22b8457eff27f5227fdf452e036b33e41e229c2 (diff) | |
download | fork-ledger-67c9cf134d1403657c766e72b96d692a7d538f65.tar.gz fork-ledger-67c9cf134d1403657c766e72b96d692a7d538f65.tar.bz2 fork-ledger-67c9cf134d1403657c766e72b96d692a7d538f65.zip |
Added --date, similar to --account and --payee
This lets you do things like store a date as the value of a tag, then
run:
ledger --date='has_tag("Foo") ? to_date(tag("Foo")) : date' reg
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -172,6 +172,12 @@ public: virtual optional<date_t> effective_date() const { return _date_eff; } + virtual void set_date(const date_t& date) { + if (use_effective_date) + _date_eff = date; + else + _date = date; + } void set_state(state_t new_state) { _state = new_state; |