mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 09:17:19 +02:00
- Fixed bugs #865 and #886, which caused silent failure of unrecognized dates (thanks to Michelle Crane).
This commit is contained in:
parent
5feb736939
commit
e42a5a831a
3 changed files with 69 additions and 8 deletions
17
src/E9.cpp
17
src/E9.cpp
|
@ -168,25 +168,26 @@ void E9::eval (const Task& task, std::vector <Arg>& value_stack)
|
|||
|
||||
if (operand._category == Arg::cat_dom && _dom)
|
||||
{
|
||||
operand._category = Arg::cat_literal;
|
||||
operand._value = context.dom.get (operand._raw, task);
|
||||
operand._category = Arg::cat_literal;
|
||||
}
|
||||
else if (operand._type == Arg::type_date &&
|
||||
operand._category == Arg::cat_literal)
|
||||
else if (operand._type == Arg::type_date)
|
||||
{
|
||||
operand._value = Date (operand._raw, _dateformat).toEpochString ();
|
||||
operand._category = Arg::cat_literal;
|
||||
operand._value = (operand._raw != "")
|
||||
? Date (operand._raw, _dateformat).toEpochString ()
|
||||
: "";
|
||||
}
|
||||
else if (operand._type == Arg::type_duration &&
|
||||
operand._category == Arg::cat_literal)
|
||||
else if (operand._type == Arg::type_duration)
|
||||
{
|
||||
operand._value = (std::string)Duration (operand._raw);
|
||||
operand._category = Arg::cat_literal;
|
||||
operand._value = (operand._raw != "")
|
||||
? (std::string)Duration (operand._raw)
|
||||
: "";
|
||||
}
|
||||
else
|
||||
operand._value = operand._raw;
|
||||
|
||||
// std::cout << "# E9::eval operand " << operand << "\n";
|
||||
value_stack.push_back (operand);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue