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 <Variant.h>
|
||||
#include <Filter.h>
|
||||
#include <Dates.h>
|
||||
#include <format.h>
|
||||
#include <i18n.h>
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue