mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ColTypeDate: Eliminated namedDates
This commit is contained in:
parent
c4b41734a9
commit
8269a3a235
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue