- Fixed bug where relative dates in filters (task list due:eom,

task list due:tomorrow, task list due:23rd ...) are now properly supported.
This commit is contained in:
Paul Beckingham 2008-09-12 15:25:38 -04:00
parent df215f228d
commit e9a71b7db9
6 changed files with 54 additions and 4 deletions

View file

@ -543,22 +543,35 @@ bool Date::isRelativeDate (const std::string& input)
else
today += (dow - today.dayOfWeek ()) * 86400;
mT = today.mT;
int m, d, y;
today.toMDY (m, d, y);
Date then (m, d, y);
mT = then.mT;
return true;
}
else if (found == "today")
{
mT = today.mT;
Date then (today.month (),
today.day (),
today.year ());
mT = then.mT;
return true;
}
else if (found == "tomorrow")
{
mT = today.mT + 86400;
Date then (today.month (),
today.day (),
today.year ());
mT = then.mT + 86400;
return true;
}
else if (found == "yesterday")
{
mT = today.mT - 86400;
Date then (today.month (),
today.day (),
today.year ());
mT = then.mT - 86400;
return true;
}
else if (found == "eom")