[Kde-pim] Alternative calendar dates

John Layt johnlayt at googlemail.com
Wed Jun 2 01:41:42 BST 2010


On Tuesday 01 Jun 2010 11:37:43 Tsvi Mostovicz wrote:
> > I am interested in the rules for moving Yom Haatsmaut and Yom Hazikaron
> > as I can easily include those in the holiday calculation.
> 
> According to the law passed by the  Israeli government in
> 1950,1951,1954,2004, the schedule is as follows:
> - If 5th of Iyyar falls on Saturday, Yom Haatsmaut is moved to Thursday
> (3rd of Iyyar)
> - Same happens if it falls on Friday, (it moves to 4th of Iyyar)
> - If it falls on Monday it is postponed to Tuesday (6th of Iyyar)
> 
> Yom Hazikaron is always the day before Yom Haatsmaut.
> 
> This leaves yom haatsmaut being on the 5th of iyyar only in case it falls
> on wednsday. (5th of iyyar can only be mon, wed, fri or sat)

Excellent, that's just what I needed, I've fixed those now.  The formula's 
look a bit hard to follow, but that's a problem with the old file format we're 
using.

> I'd be very interested to know where the development is taking place for
> this stuff being a huge amateur in the field of Jewish calendaring.

There's a number of places.

First up is the KCalendarSystemHebrew.  This is what is used if you set the 
desktop calendar system to Hebrew (System Settings > Regional > Time & Dates), 
or set up a Plasma clock or calendar widget with the Hebrew calendar (right 
click > Settings > Calendar).  The current implementation has a severe 
shortcoming in only working between 5344 and 8119, I've been meaning to do a 
re-write to fix this.

http://websvn.kde.org/trunk/KDE/kdelibs/kdecore/date/

Next up is the Jewish Holidays plugin for KOrganizer.  This enables you to 
display Jewish dates and holidays in the day views of KOrganizer (Settings > 
Configure Calendar > Plugins > Jewish Calendar Plugin).  However it's not well 
integrated, it's just text decoration, it doesn't affect days-off or the 
calendar system used.

http://websvn.kde.org/trunk/KDE/kdepim/korganizer/plugins/hebrew/

One point to note is that the plugin doesn't use KCalendarSystemHebrew, it 
implements its own date conversion formulas (or rather copied them from Emacs) 
which uses the convention Nisan = month 1 whereas KCalendarSystem uses Tishrey 
= month 1.  So long as you use month names rather than numbers, it shouldn't 
matter.

Finally, all the new holidays stuff is happening in the KHolidays library.  
This does use KCalendarSystemHebrew to do it's calculations.  Most of the work 
here now is just in the holiday data file itself which defines the rules to be 
used in the holiday calculation.  If however we find there are special dates 
that need code to calculate then that can be done.

http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/
http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/holidays/plan2/

Besides holidays, some other areas that I'm looking at for alternative 
calendars (not just Hebrew) include figuring out how to support Jewish 
birthdays and other personal commemorative days, a better way of displaying a 
second calendar date in the day/week/month views, and recurring calendar 
events calculated using alternative calendars.

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