From 8269a3a2350d2d4f75c6c06563c3ea14ffbf6f37 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 5 Mar 2017 09:30:31 -0500 Subject: [PATCH] ColTypeDate: Eliminated namedDates --- src/columns/ColTypeDate.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/columns/ColTypeDate.cpp b/src/columns/ColTypeDate.cpp index add52cdcf..822e8e8ac 100644 --- a/src/columns/ColTypeDate.cpp +++ b/src/columns/ColTypeDate.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -216,7 +215,6 @@ void ColumnTypeDate::modify (Task& task, const std::string& value) { Eval e; e.addSource (domSource); - e.addSource (namedDates); contextTask = task; e.evaluateInfixExpression (value, evaluatedValue); } @@ -231,9 +229,9 @@ void ColumnTypeDate::modify (Task& task, const std::string& value) if (evaluatedValue.type () == Variant::type_duration) { context.debug (label + _name + " <-- '" + format ("{1}", format (evaluatedValue.get_duration ())) + "' <-- '" + (std::string) evaluatedValue + "' <-- '" + value + '\''); - Variant now; - if (namedDates ("now", now)) - evaluatedValue += now; + Datetime date_now; + Variant now (date_now.toEpoch (), Variant::type_date); + evaluatedValue += now; } else {