summaryrefslogtreecommitdiff
path: root/src/post.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-18 01:48:01 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-18 01:49:49 +0100
commit1fd4387b678782f2ed90484d36f8980b64d58aa3 (patch)
tree55dd6deb43c90f873e751ff4318e674648221649 /src/post.cc
parent47d237e18b7902f54ec36ff359ae6e6d0738c67e (diff)
downloadfork-ledger-1fd4387b678782f2ed90484d36f8980b64d58aa3.tar.gz
fork-ledger-1fd4387b678782f2ed90484d36f8980b64d58aa3.tar.bz2
fork-ledger-1fd4387b678782f2ed90484d36f8980b64d58aa3.zip
Restored pricesdb command and --pricesdb-format option
Diffstat (limited to 'src/post.cc')
-rw-r--r--src/post.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/post.cc b/src/post.cc
index 3a0f3cc4..8eccf03d 100644
--- a/src/post.cc
+++ b/src/post.cc
@@ -244,6 +244,10 @@ namespace {
return long(post.reported_account()->depth);
}
+ value_t get_datetime(post_t& post) {
+ return post.xdata().datetime;
+ }
+
template <value_t (*Func)(post_t&)>
value_t get_wrapper(call_scope_t& scope) {
return (*Func)(find_scope<post_t>(scope));
@@ -282,6 +286,8 @@ expr_t::ptr_op_t post_t::lookup(const string& name)
case 'd':
if (name == "depth")
return WRAP_FUNCTOR(get_wrapper<&get_account_depth>);
+ else if (name == "datetime")
+ return WRAP_FUNCTOR(get_wrapper<&get_datetime>);
break;
case 'h':