diff --git a/ChangeLog b/ChangeLog index 0de9dc233..5b100eab9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,9 @@ if the year was not included in the dateformat (thanks to Michelle Crane). + Fixed bug #132, which failed to set a sort order so that active tasks sort higher than inactive tasks, all things being equal. + + Fixed bug #405, which incorrectly compared dates on tasks created by + versions earlier than 1.9.1 to those created by 1.9.1 or later (thanks to + Ivo Jimenez). ------ old releases ------------------------------ diff --git a/src/Att.cpp b/src/Att.cpp index 217a47157..5576919d8 100644 --- a/src/Att.cpp +++ b/src/Att.cpp @@ -492,8 +492,24 @@ bool Att::match (const Att& other) const // If there are no mods, just perform a straight compare on value. if (mMod == "") { - if (!compare (mValue, other.mValue, (bool) case_sensitive)) - return false; + // Exact matches on dates should only compare m/d/y, not h:m:s. This allows + // Comapisons like "task list due:today" (bug #405). + std::string which = type (mName); + if (which == "date") + { + Date left (mValue); + Date right (other.mValue); + + if (left.year () != right.year () || + left.month () != right.month () || + left.day () != right.day ()) + return false; + } + else + { + if (!compare (mValue, other.mValue, (bool) case_sensitive)) + return false; + } } // has = contains as a substring.