summaryrefslogtreecommitdiffabout
path: root/libkcal/todo.cpp
Unidiff
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
182QString Todo::dtDueTimeStr() const 182QString Todo::dtDueTimeStr() const
183{ 183{
184 return KGlobal::locale()->formatTime(mDtDue.time()); 184 return KGlobal::locale()->formatTime(mDtDue.time());
185} 185}
186 186
187QString Todo::dtDueDateStr(bool shortfmt) const 187QString Todo::dtDueDateStr(bool shortfmt) const
188{ 188{
189 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); 189 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt);
190} 190}
191 191
192QString Todo::dtDueStr(bool shortfmt) const 192QString Todo::dtDueStr(bool shortfmt) const
193{ 193{
194 return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); 194 if ( doesFloat() )
195 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt);
196 return KGlobal::locale()->formatDateTime(mDtDue, shortfmt);
195} 197}
196// retval 0 : no found 198// retval 0 : no found
197// 1 : due for date found 199// 1 : due for date found
198// 2 : overdue for date found 200// 2 : overdue for date found
199int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) 201int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos )
200{ 202{
201 int retval = 0; 203 int retval = 0;
202 if ( isCompleted() ) 204 if ( isCompleted() )
203 return 0; 205 return 0;
204 if ( hasDueDate() ) { 206 if ( hasDueDate() ) {
205 if ( dtDue().date() < date ) 207 if ( dtDue().date() < date )
206 return 2; 208 return 2;