summaryrefslogtreecommitdiff
path: root/valexpr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'valexpr.cc')
-rw-r--r--valexpr.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/valexpr.cc b/valexpr.cc
index 72ba5f6d..013cfad7 100644
--- a/valexpr.cc
+++ b/valexpr.cc
@@ -130,6 +130,10 @@ void value_expr_t::compute(value_t& result, const details_t& details) const
result = 0L;
break;
+ case F_NOW:
+ result = long(terminus);
+ break;
+
case DATE:
if (details.xact && transaction_has_xdata(*details.xact) &&
transaction_xdata_(*details.xact).date)
@@ -525,11 +529,7 @@ value_expr_t * parse_value_term(std::istream& in)
in.get(c);
switch (c) {
// Basic terms
- case 'm':
- node.reset(new value_expr_t(value_expr_t::CONSTANT_T));
- node->constant_t = terminus;
- break;
-
+ case 'm': node.reset(new value_expr_t(value_expr_t::F_NOW)); break;
case 'a': node.reset(new value_expr_t(value_expr_t::AMOUNT)); break;
case 'b': node.reset(new value_expr_t(value_expr_t::COST)); break;
case 'd': node.reset(new value_expr_t(value_expr_t::DATE)); break;