summaryrefslogtreecommitdiff
path: root/op.cc
diff options
context:
space:
mode:
Diffstat (limited to 'op.cc')
-rw-r--r--op.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/op.cc b/op.cc
index 0eaf386c..4e7f9e6f 100644
--- a/op.cc
+++ b/op.cc
@@ -298,16 +298,16 @@ void expr_t::op_t::compute(value_t& result,
throw compute_error("Invalid date passed to year|month|day(date)");
}
- const datetime_t& moment(result.as_datetime());
+ const date_t& moment(result.as_date());
switch (kind) {
case F_YEAR:
- result = (long)moment.date().year();
+ result = (long)moment.year();
break;
case F_MONTH:
- result = (long)moment.date().month();
+ result = (long)moment.month();
break;
case F_DAY:
- result = (long)moment.date().day();
+ result = (long)moment.day();
break;
default:
break;