summaryrefslogtreecommitdiffabout
path: root/libkcal/todo.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/todo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp4
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
@@ -182,25 +182,27 @@ QDateTime Todo::dtDue() const
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;