Task
- Improved implementation of is_duemonth and is_dueweek.
This commit is contained in:
10
src/Task.cpp
10
src/Task.cpp
@@ -462,10 +462,9 @@ bool Task::is_dueweek () const
|
|||||||
if (status != Task::completed &&
|
if (status != Task::completed &&
|
||||||
status != Task::deleted)
|
status != Task::deleted)
|
||||||
{
|
{
|
||||||
Date now;
|
|
||||||
Date due (get_date ("due"));
|
Date due (get_date ("due"));
|
||||||
if (now.year () == due.year () &&
|
if (due >= Date ("socw") &&
|
||||||
now.week () == due.week ())
|
due <= Date ("eocw"))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -483,10 +482,9 @@ bool Task::is_duemonth () const
|
|||||||
if (status != Task::completed &&
|
if (status != Task::completed &&
|
||||||
status != Task::deleted)
|
status != Task::deleted)
|
||||||
{
|
{
|
||||||
Date now;
|
|
||||||
Date due (get_date ("due"));
|
Date due (get_date ("due"));
|
||||||
if (now.year () == due.year () &&
|
if (due >= Date ("socm") &&
|
||||||
now.month () == due.month ())
|
due <= Date ("eocm"))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user