- added worded dates "later" and "someday" to enable the hiding of
  a task until doomsday.
This commit is contained in:
Federico Hernandez 2011-01-18 02:21:00 +01:00
parent be0357da4a
commit 0cac03ad4a
5 changed files with 27 additions and 2 deletions

View file

@ -985,6 +985,8 @@ bool Date::isRelativeDate (const std::string& input)
supported.push_back ("midsommar");
supported.push_back ("midsommarafton");
supported.push_back ("now");
supported.push_back ("later");
supported.push_back ("someday");
std::vector <std::string> matches;
if (autoComplete (in, supported, matches) == 1)
@ -1141,6 +1143,12 @@ bool Date::isRelativeDate (const std::string& input)
mT = time (NULL);
return true;
}
else if (found == "later" || found == "someday")
{
Date then (1, 18, 2038);
mT = then.mT;
return true;
}
}
// Support "21st" to indicate the next date that is the 21st day.