summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-01-23 15:44:48 (UTC)
committer zautrix <zautrix>2005-01-23 15:44:48 (UTC)
commitabe5f73892c123110faec5648b484628b3265fd6 (patch) (side-by-side diff)
tree8619e09ffbeb3b5ef9302a8bcb39092b426d3e43 /korganizer
parent6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452 (diff)
downloadkdepimpi-abe5f73892c123110faec5648b484628b3265fd6.zip
kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.tar.gz
kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.tar.bz2
bter today
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index c5acafd..6428757 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -639,4 +639,5 @@ void KOAgendaView::createDayLabels()
dayLabel->show();
DateList::ConstIterator dit;
+ bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
QDate date = *dit;
@@ -683,5 +684,20 @@ void KOAgendaView::createDayLabels()
break;
}
-
+ if ( oneday ) {
+ QString addString;
+ if ( mSelectedDates.first() == QDateTime::currentDateTime().date() )
+ addString = i18n("Today");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
+ addString = i18n("Tomorrow");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
+ addString = i18n("Yesterday");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
+ addString = i18n("Day before yesterday");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
+ addString = i18n("Day after tomorrow");
+ if ( !addString.isEmpty() ) {
+ str = addString+", " + str;
+ }
+ }
dayLabel->setText(str);
dayLabel->setAlignment(QLabel::AlignHCenter);