bug-gcal
[Top][All Lists]
Advanced

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

[Bug-gcal] Update to Swedish holidays


From: Göran Uddeborg
Subject: [Bug-gcal] Update to Swedish holidays
Date: Sun, 12 Jun 2016 18:16:34 +0200

Continuing my exploration of gcal, I found that it isn't quite
up-to-date when it comes to Swedish holidays.  In 2005, the national
day became a holiday, and the Pentecost Monday lost the same status.
It's still marked in the calendar, but nothing is closed any more.

To fix the National holiday part I guess is easy, one possible patch
is attached below.  I'm not quite sure what the appropriate way to
handle Pentecost Monday (HD_WHIT_MONDAY).  It is marked as a holiday
in the base_christian_hdy() function, and I haven't seen any obvious
way to modify just that flag afterwards.

Looking at how the flags have been used for the other Swedish
holidays, I guess DIS_HLS_PREF would be an appropriate flag for this
case for years 2005 and later.

--- src/hd-data4.c~     2015-01-02 14:06:39.000000000 +0100
+++ src/hd-data4.c      2016-06-12 18:01:40.000000000 +0200
@@ -2488,7 +2488,8 @@
   holiday (*init_data, detected, _(hd_text[HD_MOTHERS_DAY].ht_text),
           ptr_cc_id, DIS_HLS_PREF, day, 5, year, hd_elems, fday, count);
   holiday (*init_data, detected, _(hd_text[HD_NATIONAL_HOLIDAY].ht_text),
-          ptr_cc_id, DIS_HLS_PREF2, 6, 6, year, hd_elems, fday, count);
+          ptr_cc_id, year >= 2005 ? "+" : DIS_HLS_PREF2, 6, 6, year, hd_elems,
+          fday, count);
   holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text),
           ptr_cc_id, DIS_HLS_PREF, 23, MONTH_MAX, year, hd_elems, fday,
           count);



reply via email to

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