diff --git a/src/task.cpp b/src/task.cpp index 42251f947..9ba532724 100644 --- a/src/task.cpp +++ b/src/task.cpp @@ -509,8 +509,8 @@ void handleList (const TDB& tdb, T& task, Config& conf) due = dt.toString (conf.get ("dateformat", "m/d/Y")); overdue = (dt < now) ? true : false; - now += 7 * 86400; - imminent = dt < now ? true : false; + Date nextweek = now + 7 * 86400; + imminent = dt < nextweek ? true : false; } std::string active; @@ -679,8 +679,8 @@ void handleSmallList (const TDB& tdb, T& task, Config& conf) due = dt.toString (conf.get ("dateformat", "m/d/Y")); overdue = (dt < now) ? true : false; - now += 7 * 86400; - imminent = dt < now ? true : false; + Date nextweek = now + 7 * 86400; + imminent = dt < nextweek ? true : false; } std::string active; @@ -955,8 +955,8 @@ void handleInfo (const TDB& tdb, T& task, Config& conf) if (due.length ()) { overdue = (dt < now) ? true : false; - now += 7 * 86400; - imminent = dt < now ? true : false; + Date nextweek = now + 7 * 86400; + imminent = dt < nextweek ? true : false; if (conf.get ("color", true)) { @@ -1175,8 +1175,8 @@ void handleLongList (const TDB& tdb, T& task, Config& conf) due = dt.toString (conf.get ("dateformat", "m/d/Y")); overdue = (dt < now) ? true : false; - now += 7 * 86400; - imminent = dt < now ? true : false; + Date nextweek = now + 7 * 86400; + imminent = dt < nextweek ? true : false; } std::string age; @@ -1531,8 +1531,8 @@ void handleReportNext (const TDB& tdb, T& task, Config& conf) due = dt.toString (conf.get ("dateformat", "m/d/Y")); overdue = (dt < now) ? true : false; - now += 7 * 86400; - imminent = dt < now ? true : false; + Date nextweek = now + 7 * 86400; + imminent = dt < nextweek ? true : false; } std::string active; @@ -2044,8 +2044,8 @@ void handleReportActive (const TDB& tdb, T& task, Config& conf) Date now; overdue = dt < now ? true : false; - now += 7 * 86400; - imminent = dt < now ? true : false; + Date nextweek = now + 7 * 86400; + imminent = dt < nextweek ? true : false; } // All criteria match, so add refTask to the output table.