From 86c0d35262454a31ed7d50d3e20cbdace954ebdf Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 05 Feb 2005 11:26:35 +0000 Subject: another fixx --- (limited to 'korganizer/mainwindow.cpp') diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a2c20a8..5bc8c00 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1346,7 +1346,16 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) if ( incidence->dtStart().time() != incidence->dtEnd().time() ) startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); - startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); + if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { + bool ok; + QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); + if ( ok ) { + int years = noc.date().year() - incidence->dtStart().date().year(); + startString += i18n(" (%1 y.)"). arg( years ); + } + } + else + startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); } } -- cgit v0.9.0.2