[Kde-pim] Alternative calendar dates
John Layt
johnlayt at googlemail.com
Tue Apr 20 11:02:21 BST 2010
On Wednesday 14 Apr 2010 08:00:33 Dotan Cohen wrote:
> From where does Korganizer source the data for alternative calendar
> dates, such as the Jewish Calendar plugin? There is currently a
> discussion on the linux-il (Israeli LUG) list regarding the
> maintenance of the /usr/share/calendar.judaic file, which is out of
> date. Does Korganizer use this file? Do other applications? Is it
> worthy to maintain?
>
> Thanks in advance.
There's two methods for displaying holidays in KOrganizer, neither of which
uses the files from the BSD calendar command.
The first is the KDE KHolidays holiday region files which up to now have only
supported the Gregorian calendar system. These are also used in the Plasma
panel clock. You can find this at
http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/
The second is using a plugin, in this case the Jewish Calendar plugin, which
has it's own code to calculate the holidays. You can find the plugin at
http://websvn.kde.org/trunk/KDE/kdepim/korganizer/plugins/hebrew/ especially
the holiday.cpp file that has a giant case statement for each day of the
Jewish year to determine if it's a holiday or not. Note this code is
completely independent of the KCalendarSystem Hebrew calendar implementation
and is implemented with Nissan = month 1 rather than Tishrei = month 1 as
KCalendarSystem does, but I'm not sure if that causes issues or not as the
formulas used are different.
For 4.5 however things are changing. The KDE holiday region files now support
any KDE calendar system, including Hebrew, so I will be adding new separate
files for the Israeli civil holidays and Jewish religious holidays in both
English and Hebrew. We can even have separate files for Orthodox and Western
holidays if needed. I need to get moving with those files, any help would be
appreciated :-)
Eventually we will be able to drop the KOrganizer Jewish calendar plugin, once
KOrganizer supports setting multiple holiday regions, and setting an
alternative/second calendar system to be displayed in the date cells.
Longer term, the plan is to create a new XML holiday file format standardised
by freedesktop.org so there's only a single set of files shared and maintained
by everyone. This format would support all calendar systems, complex
calculations, and proper translation.
A quick look at the BSD calendar file format at http://www.openbsd.org/cgi-
bin/cvsweb/src/usr.bin/calendar/ shows it's completely incapable of supporting
any complex rules and so needs updating every year, and I've never heard of it
being used anywhere else. Most other programs just use iCal files, usually
the Mozilla ones (http://www.mozilla.org/projects/calendar/holidays.html), but
they only support Gregorian so also need updating yearly so are not an ideal
solution. I doubt the BSD files are worth maintaining, but it might be useful
to add support for reading the files into KHolidays at a later date.
Cheers!
John.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list