[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[smc-calendar] Good news folks - traced the bug back to setYMD

From: Praveen A
Subject: [smc-calendar] Good news folks - traced the bug back to setYMD
Date: Sat, 10 Jan 2009 22:01:07 -0800

Happy news after some frustrated days. My first attempt at tracking this bug was creating the test cases from Jalali calendar template. But I was not careful enough to catch it then because I did a lousy job to get the test cases working. But all was not lost there because that helped to fix some other functions to check valid dates and helped unearth some cool methods in QDate to set date. Now all test cases run successfully (because I did it backwords like starting from the results to fill the steps in a math problem), but the bug still out there.

Now tried to set kDebug() calls to print values of the input variables in setYMD as I was almost sure about the location. But caught in between the qt 4.5 testing and had to rebuild entire kde from scratch. But finally I got the freshly built kde to run with startx as opposed to choosing from gdm session and redirected the output to a log file. From the log it was clear the function was getting inputs in Saka and out assumtion was that it gets Gregorian. So got to write the conversion otherway around.

In summary,
The object stores values in gregorian and funtions that convert from gregorian to saka are year(), month() and day(). Important function that coverts the otherway around is setYMD(), it is deprecated, so it calls the new setDate() function. The actual conversion takes place in KCalendarSystemSaka::SakaToJD(). It got to change a bit to consider actual day the year start, depending on it, it can be 78 or 79 years to add (for eaxmple it is 1930 in Saka which is 79 years behind). Got to clean the whole code a bit I guess.

So we have almost full working code.

Cheer up folks,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]