Diffstat (limited to 'korganizer/kdatenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kdatenavigator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 7d0c516..b420351 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -250,8 +250,11 @@ void KDateNavigator::updateView() int dayOfYear = KOGlobals::self()->calendarSystem()->dayOfYear((daymatrix->getDate((i+1)*7-4))); + int add = 0; + if ( ! KGlobal::locale()->weekStartsMonday() ) + ++add; if (dayOfYear % 7 != 0) - weeknum.setNum(dayOfYear / 7 + 1); + weeknum.setNum(dayOfYear / 7 + 1+add); else - weeknum.setNum(dayOfYear / 7); + weeknum.setNum(dayOfYear / 7 +add); weeknos[i]->setText(weeknum); } |