smc-calendar
[Top][All Lists]
Advanced

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

[smc-calendar] Fwd: [Bug 183357] non gregorian calendar is broken


From: Praveen A
Subject: [smc-calendar] Fwd: [Bug 183357] non gregorian calendar is broken
Date: Tue, 2 Jun 2009 23:49:05 -0700

Hi,

Please subscribe to this bug report. Any help with testing and fixing this bug would be great.

- Praveen

Forwarded conversation
Subject: [Bug 183357] non gregorian calendar is broken
------------------------

From: Marco Martin <address@hidden>
Date: 2009/5/18
To: address@hidden


https://bugs.kde.org/show_bug.cgi?id=183357


Marco Martin <address@hidden> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |address@hidden




--- Comment #3 from Marco Martin <notmart gmail com>  2009-05-18 22:09:06 ---
*** Bug 185093 has been marked as a duplicate of this bug. ***

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

----------
From: Mahesh <address@hidden>
Date: 2009/5/18
To: address@hidden


Mahesh <address@hidden> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |address@hidden
You are a voter for the bug.

----------
From: Praveen A <address@hidden>
Date: 2009/5/18
To: address@hidden


--- Comment #4 from Praveen A <pravi a gmail com>  2009-05-19 08:38:49 ---
Month and Week changes are working now. But clicking on any day reproduces the
bug.  kdebase r969739 and kdelibs r969859. Its a regression.

----------
From: Emil Sedgh <address@hidden>
Date: 2009/5/18
To: address@hidden


Emil Sedgh <address@hidden> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |address@hidden




--- Comment #5 from Emil Sedgh <emilsedgh gmail com>  2009-05-19 08:42:25 ---
I can confirm what Praveen said.

----------
From: Aaron J. Seigo <address@hidden>
Date: 2009/5/19
To: address@hidden


Aaron J. Seigo <address@hidden> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |address@hidden,
                  |                            |address@hidden




--- Comment #6 from Aaron J. Seigo <aseigo kde org>  2009-05-19 14:20:15 ---
well, testing with the Hebrew calendar system and the following code:

QDate d = QDate::currentDate();
int calYear = calendar->year(d);
int calMonth = calendar->month(d);
int calDay = calendar->day(d);
kDebug() << "For" << d << "localized date is" << calYear << calMonth << calDay;
kDebug() << "and the month name is: " << calendar->monthName(calMonth,
calYear);
calendar->setDate(d, calYear, calMonth, calDay);
kDebug() << "converted back from the localized dates:" << d;

i get this with the Hebrew calendar:

For QDate("Tue May 19 2009") localized date is 5769 8 25
and the month name is:  "Iyar"
converted back from the localized dates: QDate("Tue Aug 24 -3893")

that is quite obviously wrong.

with the Jalali calendar i get:

For QDate("Tue May 19 2009") localized date is 1388 2 29
and the month name is:  "Ordibehesht"
converted back from the localized dates: QDate("Tue May 19 2009")

that is quite obviously correct.

with Hijri i get:

For QDate("Tue May 19 2009") localized date is 1430 5 24
and the month name is:  "Jumaada al-Awal"
converted back from the localized dates: QDate("Wed May 20 2009")

while that is quite obviously wrong, it's not nearly as bad as with the Hebrew
calendar.

now.. guess which calendar systems work properly and which don't in the plasma
calendar? answer: Gregorian works, Jalali works ... Hebrew and Hijri don't.

now, there was a bug in the Plasma calendar where it was assuming the year was
12 months long. that wasn't right, but i've fixed that one now.

at this point it looks like a kdelibs bug. i'm adding John Layt to the CC list
so he can confirm/deny so we can triage this to the right place.

----------
From: John Layt <address@hidden>
Date: 2009/6/1
To: address@hidden


John Layt <address@hidden> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
         Component|general                     |kdecore
           Product|plasma                      |kdelibs




--- Comment #7 from John Layt <john layt net>  2009-06-01 23:35:28 ---
Hi Aaron, thanks for the triage and test cases, does look like a kdelibs bug
and similar to another one we have reported already so I'll have a crack at it
to get my hand back in after too many months away...

----------
From: John Layt <address@hidden>
Date: 2009/6/1
To: address@hidden


        AssignedTo|address@hidden         |address@hidden

----------
From: Aaron J. Seigo <address@hidden>
Date: 2009/6/1
To: address@hidden


--- Comment #8 from Aaron J. Seigo <aseigo kde org>  2009-06-02 04:50:56 ---
awesome; thanks John. if i knew anything about calendaring systems i'd give a
crack myself, but it's really not a strong area of knowledge for me, to say the
least.

if you need/want any testers though, hook me up ...

----------
From: John Layt <address@hidden>
Date: 2009/6/2
To: address@hidden


--- Comment #9 from John Layt <john layt net>  2009-06-03 00:46:45 ---
Aaron, I've been looking at the Plasma calendar code some more as KDatePicker
is working fine, and there look to be a lot of bugs in there that could lead to
non-Gregorian calendars not working properly.  For example, setDate() allows
you to set a date outside the calendar systems valid range, there are lots of
places still assuming 12 months in the year or directly using QDate methods
instead of the calendar system methods, not catering for leap months, etc.  I
want to go through and fix them up to match the well-proven algorithms from
KDatePicker/KDateTable but thought I should check with you first that you're
happy for me to do so.  I can post patches to the review board if you want.

The new populateHolidays() stuff also has a lot of code that assumes Gregorian
months rather than the actual month displayed, e.g. month Foo in calendar Bar
may in fact be 11 March to 5 April in Gregorian and asking for all holidays in
March instead of Foo may not be right.  I haven't looked at the data engine or
PIM side yet to see if Gregorian is actually what is needed, but I suspect not.
 Are you also happy for me to hack at this?

Finally, there do appear to be some round trip issues with date conversions
which I think lie with the formula's currently used, e.g. Jalali we know is
wrong outside a limited range, but I'm struggling to find a correct and free
formula for the full date range.  However, none of these should actually be
causing the problems seen as KDatePicker works ok in spite of them.




--
പ്രവീണ്‍ അരിമ്പ്രത്തൊടിയില്‍
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
Join The DRM Elimination Crew Now!
http://fci.wikia.com/wiki/Anti-DRM-Campaign

reply via email to

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