mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-02 05:30:23 +02:00
- 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:
parent
df215f228d
commit
e9a71b7db9
6 changed files with 54 additions and 4 deletions
21
src/Date.cpp
21
src/Date.cpp
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue