-rw-r--r-- | korganizer/koagendaitem.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index b416115..407424d 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -580,2 +580,6 @@ void KOAgendaItem::computeText() if ( mAllDay ) { + if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { + int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); + mDisplayedText += " ("+QString::number( dur )+i18n(" days") +")" ; + if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) { @@ -584,4 +588,4 @@ void KOAgendaItem::computeText() } else { - int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); - mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) + " ("+QString::number( dur )+i18n(" days") +")" ; + mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true); + } } |