ColTypeDate: Eliminated namedDates
This commit is contained in:
@@ -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,9 +229,9 @@ 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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user