mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: New filter attribute modifier "by", uses '<=' for comparison
This patch allows e.g. due.by:tomorrow that includes all of tomorrow, because it uses less than or equal to, rather than just less than, like 'before' modifier does. This allows matching the last second of the day when filtering by "due.by:eod", and more generally allows date filters with an inclusive end-interval specification. Closes #2536
This commit is contained in:
parent
af6f2b55ec
commit
ac3572a4f5
2 changed files with 6 additions and 0 deletions
|
@ -1341,6 +1341,11 @@ void CLI2::desugarFilterAttributes ()
|
|||
op.attribute ("raw", ">");
|
||||
rhs.attribute ("raw", value);
|
||||
}
|
||||
else if (mod == "by")
|
||||
{
|
||||
op.attribute ("raw", "<=");
|
||||
rhs.attribute ("raw", value);
|
||||
}
|
||||
else if (mod == "none")
|
||||
{
|
||||
op.attribute ("raw", "==");
|
||||
|
|
|
@ -397,6 +397,7 @@ static const char* modifierNames[] =
|
|||
{
|
||||
"before", "under", "below",
|
||||
"after", "over", "above",
|
||||
"by",
|
||||
"none",
|
||||
"any",
|
||||
"is", "equals",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue