[Kde-pim] Updated gb holiday file

John Layt johnlayt at googlemail.com
Thu Jan 14 00:23:11 GMT 2010


On Wednesday 13 January 2010 19:15:58 Ian Neal wrote:
>   Christophe Giboudeaux wrote:
> > Thanks for the patch, I'll commit it soon. I just have a small issue with
> > this
> > 
> > date :
> >> +red "Christmas Day Bank Holiday" weekend on december 25 shift to monday
> >> if saturday || sunday
> >> +red "Boxing Day Bank Holiday" weekend on december 26 shift to tuesday
> >> if sunday || monday
> >> +red "Boxing Day Bank Holiday" weekend on december 26 shift to monday if
> >> saturday
> > 
> > which is displayed twice. The updated file will be part of KDE 4.4
> > 
> > Christophe.
> 
> Unfortunately the only way to get the Boxing Day Bank Holiday to show up
> correctly is to have those two entries. The current syntax for the
> holiday file cannot seem to cope in one line with (unless you know
> otherwise):
> if Boxing Day Bank Holiday falls on Saturday move it to Monday else if
> it falls on Sunday or Monday move it to Tuesday.
> 
> Hope that answers your issue.
> 
> Thanks,
> 
> Ian

Funnily enough, I'm just poking around in the internals of the holiday file 
parser to try add something else (alternative calendar systems if you want to 
know :-) and I think I now understand how it all works.

I don't think the current SHIFT syntax will work here, and I can't think of 
another form that would work 100% either.  I'll try come up with a change to 
the grammar for 4.5 to cater for more complex shift rules, or an exclude 
keyword, or a de-dupe process (or all of them).

This raises the question about how to display the holiday itself and the 
observance day.  For example in the UK you have Christmas Day itself, and the 
separate Bank Holiday that can move to the first available working day if the 
actual day falls on a weekend.  If they both fall on the same day, do we still 
display both 'Christmas Day' and 'Christmas Day Bank Holiday' or is just 
'Christmas Day' sufficient?  Or do we display 'Christmas Day' itself simply as 
a Religious Holiday and give the Public Holiday status only to the 'Christmas 
Day Bank Holiday'?  Or do we allow this choice to be configured in the file?

I think the grammar should allow for two different kinds of shift, one where 
the entire holiday is shifted with only the resulting day being 'marked', and 
one where both actual and observed days are 'marked'.

And how should KHoliday return these details to the app, with 2 separate 
holiday events with separate names, or 1 event with 2 dates and names embedded 
for actual and observed dates?  I'd prefer the latter, it leaves more work for 
the app, but also gives the app more power on how to choose to display things.  
(Same goes for duration, a 2 day holiday should be a single event displayed as 
spanning 2 days, not as two separate events).

John.

P.S. I should note that only na and za files currently use the shift keyword, 
so the impact from changing the grammar or behaviour is minimal.
_______________________________________________
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