mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task
- Improved implementation of is_duemonth and is_dueweek.
This commit is contained in:
parent
3116ddcd6d
commit
d1f5020fab
1 changed files with 4 additions and 6 deletions
10
src/Task.cpp
10
src/Task.cpp
|
@ -462,10 +462,9 @@ bool Task::is_dueweek () const
|
|||
if (status != Task::completed &&
|
||||
status != Task::deleted)
|
||||
{
|
||||
Date now;
|
||||
Date due (get_date ("due"));
|
||||
if (now.year () == due.year () &&
|
||||
now.week () == due.week ())
|
||||
if (due >= Date ("socw") &&
|
||||
due <= Date ("eocw"))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -483,10 +482,9 @@ bool Task::is_duemonth () const
|
|||
if (status != Task::completed &&
|
||||
status != Task::deleted)
|
||||
{
|
||||
Date now;
|
||||
Date due (get_date ("due"));
|
||||
if (now.year () == due.year () &&
|
||||
now.month () == due.month ())
|
||||
if (due >= Date ("socm") &&
|
||||
due <= Date ("eocm"))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue