ColTypeDate: Eliminated namedDates

This commit is contained in:
Paul Beckingham 2017-03-05 09:30:31 -05:00
parent c4b41734a9
commit 8269a3a235

View file

@ -32,7 +32,6 @@
#include <Eval.h> #include <Eval.h>
#include <Variant.h> #include <Variant.h>
#include <Filter.h> #include <Filter.h>
#include <Dates.h>
#include <format.h> #include <format.h>
#include <i18n.h> #include <i18n.h>
@ -216,7 +215,6 @@ void ColumnTypeDate::modify (Task& task, const std::string& value)
{ {
Eval e; Eval e;
e.addSource (domSource); e.addSource (domSource);
e.addSource (namedDates);
contextTask = task; contextTask = task;
e.evaluateInfixExpression (value, evaluatedValue); e.evaluateInfixExpression (value, evaluatedValue);
} }
@ -231,8 +229,8 @@ void ColumnTypeDate::modify (Task& task, const std::string& value)
if (evaluatedValue.type () == Variant::type_duration) if (evaluatedValue.type () == Variant::type_duration)
{ {
context.debug (label + _name + " <-- '" + format ("{1}", format (evaluatedValue.get_duration ())) + "' <-- '" + (std::string) evaluatedValue + "' <-- '" + value + '\''); context.debug (label + _name + " <-- '" + format ("{1}", format (evaluatedValue.get_duration ())) + "' <-- '" + (std::string) evaluatedValue + "' <-- '" + value + '\'');
Variant now; Datetime date_now;
if (namedDates ("now", now)) Variant now (date_now.toEpoch (), Variant::type_date);
evaluatedValue += now; evaluatedValue += now;
} }
else else