From 9502e7563dd1bc2bf581b07e9d6e92660f3a7142 Mon Sep 17 00:00:00 2001 From: Praveen Arimbrathodiyil Date: Sun, 11 Jan 2009 14:10:22 -0800 Subject: daysInYear function fixed. --- calendar/kde/kdelibs/kdecore/date/kcalendarsystemindic.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'calendar') diff --git a/calendar/kde/kdelibs/kdecore/date/kcalendarsystemindic.cpp b/calendar/kde/kdelibs/kdecore/date/kcalendarsystemindic.cpp index d8840da..2476752 100644 --- a/calendar/kde/kdelibs/kdecore/date/kcalendarsystemindic.cpp +++ b/calendar/kde/kdelibs/kdecore/date/kcalendarsystemindic.cpp @@ -144,7 +144,7 @@ bool KCalendarSystemIndic::isValid( const QDate &date ) const bool KCalendarSystemIndic::setDate( QDate &date, int year, int month, int day ) const { // Gets its value in Saka that need to be converted into Gregorian - kDebug() << "setDate: year, month , day"<< year << month << day; + // kDebug() << "setDate: year, month , day"<< year << month << day; date = QDate::fromJulianDay( KCalendarSystemSaka::SakaToJD(year, month, day) ); return true; } @@ -288,7 +288,9 @@ int KCalendarSystemIndic::weeksInYear( int year ) const int KCalendarSystemIndic::daysInYear( const QDate &date ) const { - return KCalendarSystem::daysInYear( date ); + if (KCalendarSystemIndic::isLeapYear(KCalendarSystemIndic::year(date))) + return 366; + return 365; } int KCalendarSystemIndic::daysInMonth( const QDate &date ) const -- cgit