summaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorPraveen Arimbrathodiyil <pravi.a@gmail.com>2009-01-11 14:10:22 -0800
committerPraveen Arimbrathodiyil <pravi.a@gmail.com>2009-01-11 14:10:22 -0800
commit9502e7563dd1bc2bf581b07e9d6e92660f3a7142 (patch)
tree3f353fe0d4fc92a16bb358817d178688361a3eda /calendar
parent1359f77e11cfd79948c32ac63a8c1451be2cb0e0 (diff)
downloadRachana.git-9502e7563dd1bc2bf581b07e9d6e92660f3a7142.tar.gz
Rachana.git-9502e7563dd1bc2bf581b07e9d6e92660f3a7142.tar.xz
Rachana.git-9502e7563dd1bc2bf581b07e9d6e92660f3a7142.zip
daysInYear function fixed.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/kde/kdelibs/kdecore/date/kcalendarsystemindic.cpp6
1 files changed, 4 insertions, 2 deletions
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