-rw-r--r-- | libkcal/todo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 39d16b6..a496404 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -178,33 +178,35 @@ QDateTime Todo::dtDue() const { return mDtDue; } QString Todo::dtDueTimeStr() const { return KGlobal::locale()->formatTime(mDtDue.time()); } QString Todo::dtDueDateStr(bool shortfmt) const { return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); } QString Todo::dtDueStr(bool shortfmt) const { - return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); + if ( doesFloat() ) + return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); + return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); } // retval 0 : no found // 1 : due for date found // 2 : overdue for date found int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) { int retval = 0; if ( isCompleted() ) return 0; if ( hasDueDate() ) { if ( dtDue().date() < date ) return 2; // we do not return, because we may find an overdue sub todo if ( dtDue().date() == date ) retval = 1; } |