[Kde-pim] Holiday Files

Dr. Robert Marmorstein robert at narnia.homeunix.com
Fri Jan 15 15:51:42 GMT 2010


The recent discussion about gb holiday files piqued my curiosity about how 
these work, so I will be playing around with them some.  In addition to the 
usual regional holidays, my school has its own "holidays" after exams and 
such.  It would be neat if I could create a custom "holiday file" for these.  
However, I don't want to lose the regional holidays.  Is there a way to 
"include" another holiday file inside my custom file or will I just need to copy 
and paste them?

Thanks,

Robert

On Fri January 15 2010 10:16:11 am John Layt wrote:
> On Thursday 14 January 2010 00:23:11 John Layt wrote:
> > 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
> >
> > 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).
> 
> Actually, now I've almost completely re-written the parser and understand
>  it better, there is a way to do it using the existing Relative Date syntax
>  rather than the Shift syntax.  Have a look at the file for Chile (cl)
>  which does a lot of this.  It's a little hard to understand but it will
>  work until I sort out a better Shift syntax:
> 
> "Boxing Day Bank Holiday" red on (([12/26] == [saturday after ([12/25])] )
>  ? [monday after ([12/25])] : (([12/26] == [sunday after ([12/25])] ||
>  [12/26] == [monday after ([12/25])]) ? [tuesday after ([12/25])]:[12/26]))
> 
> Remember that all needs to go on 1 line.  It doesn't remove the need to
>  have 2 separate entries for "Boxing Day" and "Boxing Day Bank Holiday",
>  but it's better than 3 entries or not having the day off marked at all :-)
> 
> John.
> 
> P.S. Should we also include the new one-off 2012 holidays now while we
> remember?
> _______________________________________________
> 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/
> 
_______________________________________________
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