- If a date attribute is eval'ed and the result is a duration, add the value
  of 'now' to it, and store the result.  So '2wks' as a due date is interpreted
  as 'now + 2ks'.
This commit is contained in:
Paul Beckingham 2014-05-26 23:18:20 -04:00
parent a32f2f991a
commit 398bc9c824

View file

@ -2020,8 +2020,14 @@ void Task::modify (modType type)
e.evaluateInfixExpression (value, v);
context.debug (label + name + " <-- " + format ("{1}", v.get_date ()) + " <-- " + (std::string) v + " <-- " + value);
// TODO If v is duration and < 5y, add to now, else store as date.
// TODO Not sure if the above still holds true.
// If v is duration, add 'now' to it, else store as date.
if (v.type () == Variant::type_duration)
{
Variant now;
if (namedDates ("now", now))
v += now;
}
set (name, v.get_date ());
++modCount;
}