>From a014c476fe88f9d3883654e3ad016c62c7663b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Uddeborg?=
Date: Mon, 13 Jun 2016 21:42:57 +0200 Subject: [PATCH] National holiday replaced Pentecost Monday as a Swedish holiday 2005. --- src/hd-data.c | 8 +++++--- src/hd-data.h | 3 ++- src/hd-data1.c | 8 ++++---- src/hd-data2.c | 18 +++++++++--------- src/hd-data3.c | 26 +++++++++++++------------- src/hd-data4.c | 18 +++++++++++------- src/hd-data5.c | 6 +++--- 7 files changed, 47 insertions(+), 40 deletions(-) diff --git a/src/hd-data.c b/src/hd-data.c index c819dc9..c0be5f4 100644 --- a/src/hd-data.c +++ b/src/hd-data.c @@ -1219,7 +1219,7 @@ binsearch_cc_id (id) void -base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, count) +base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, count, cc) Bool *init_data; const Bool detected; int easter; @@ -1227,6 +1227,7 @@ base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, count) int *hd_elems; const int fday; const int count; + const char *cc; /*! Manages all base Christian Western churches calendar based holidays. */ @@ -1241,8 +1242,9 @@ base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, count) ptr_cc_id, "+", DAY_MIN, MONTH_MIN, year, hd_elems, fday, count); holiday (*init_data, detected, _(hd_text[HD_PENTECOST].ht_text), ptr_cc_id, "+", easter + 49, 0, year, hd_elems, fday, count); - holiday (*init_data, detected, _(hd_text[HD_WHIT_MONDAY].ht_text), - ptr_cc_id, "+", easter + 50, 0, year, hd_elems, fday, count); + if (strcmp(cc, "SE") != 0) + holiday (*init_data, detected, _(hd_text[HD_WHIT_MONDAY].ht_text), + ptr_cc_id, "+", easter + 50, 0, year, hd_elems, fday, count); } diff --git a/src/hd-data.h b/src/hd-data.h index 4a3174a..6cd5e78 100644 --- a/src/hd-data.h +++ b/src/hd-data.h @@ -45,7 +45,8 @@ extern void const Bool detected, int easter, const int year, - int *hd_elems, const int fday, const int count)); + int *hd_elems, const int fday, const int count, + const char *cc)); extern void astronomical_hdy __P_ ((Bool * init_data, const Bool detected, diff --git a/src/hd-data1.c b/src/hd-data1.c index c363947..3740228 100644 --- a/src/hd-data1.c +++ b/src/hd-data1.c @@ -190,7 +190,7 @@ be_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_ARMISTICE_DAY].ht_text), ptr_cc_id, "+", 11, 11, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -648,7 +648,7 @@ de_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_LABOUR_DAY].ht_text), ptr_cc_id, "+", DAY_MIN, 5, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); if (year == 2017) holiday (*init_data, detected, _(hd_text[HD_REFORMATION_DAY].ht_text), ptr_cc_id, "+", dvec[10 - 1], 10, year, hd_elems, fday, @@ -783,7 +783,7 @@ fr_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_VICTORY_DAY].ht_text), ptr_cc_id, "+", 8, 5, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1551,7 +1551,7 @@ nl_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_LIBERATION_DAY].ht_text), ptr_cc_id, "+", 5, 5, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } diff --git a/src/hd-data2.c b/src/hd-data2.c index 4ef91ee..567f9a2 100644 --- a/src/hd-data2.c +++ b/src/hd-data2.c @@ -123,7 +123,7 @@ ad_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text), ptr_cc_id, "+", 6, MONTH_MIN, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -236,7 +236,7 @@ ag_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", DAY_MIN, 11, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -290,7 +290,7 @@ ai_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text), ptr_cc_id, "+", day, 6, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -463,7 +463,7 @@ an_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text), ptr_cc_id, "+", dvec[4 - 1], 4, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -811,7 +811,7 @@ at_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text), ptr_cc_id, "+", 6, MONTH_MIN, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1398,7 +1398,7 @@ bb_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", dvec[11 - 1], 11, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1669,7 +1669,7 @@ bj_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_WOMENS_DAY].ht_text), ptr_cc_id, "+", 8, 3, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1877,7 +1877,7 @@ bs_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -3391,7 +3391,7 @@ ci_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } diff --git a/src/hd-data3.c b/src/hd-data3.c index b8dbb5f..1ddb935 100644 --- a/src/hd-data3.c +++ b/src/hd-data3.c @@ -558,7 +558,7 @@ dk_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THE_QUEENS_BIRTHDAY].ht_text), ptr_cc_id, DIS_HLS_PREF, 16, 4, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -608,7 +608,7 @@ dm_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", i, 11, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1365,7 +1365,7 @@ fo_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF2, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1418,7 +1418,7 @@ ga_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1581,7 +1581,7 @@ gd_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THANKSGIVING_DAY].ht_text), ptr_cc_id, "+", 25, 10, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -2051,7 +2051,7 @@ gr_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text), ptr_cc_id, "+", 6, MONTH_MIN, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -2572,7 +2572,7 @@ hu_hdy (init_data, detected, easter, year, hd_elems, fday, count) ptr_cc_id, "+", 1, 11, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -2864,7 +2864,7 @@ is_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_SYLVESTER].ht_text), ptr_cc_id, "#", dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -3291,7 +3291,7 @@ kn_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", 19, 9, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -3445,7 +3445,7 @@ ky_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -3748,7 +3748,7 @@ lc_hdy (init_data, detected, easter, year, hd_elems, fday, count) ptr_cc_id, "+", day, 2, year, hd_elems, fday, count); } base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -3804,7 +3804,7 @@ li_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_THREE_KINGS_DAY].ht_text), ptr_cc_id, "+", 6, MONTH_MIN, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -4234,7 +4234,7 @@ lu_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } diff --git a/src/hd-data4.c b/src/hd-data4.c index d1b312a..8c2f99c 100644 --- a/src/hd-data4.c +++ b/src/hd-data4.c @@ -158,7 +158,7 @@ mc_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF2, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -605,7 +605,7 @@ mq_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_ARMISTICE_DAY].ht_text), ptr_cc_id, "+", 11, 11, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -688,7 +688,7 @@ ms_hdy (init_data, detected, easter, year, hd_elems, fday, count) ptr_cc_id, "+", day, 8, year, hd_elems, fday, count); } base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -1370,7 +1370,7 @@ no_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_LIBERATION_DAY].ht_text), ptr_cc_id, DIS_HLS_PREF, 8, 5, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -2488,7 +2488,8 @@ se_hdy (init_data, detected, easter, year, hd_elems, fday, count) 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); @@ -2506,7 +2507,10 @@ se_hdy (init_data, detected, easter, year, hd_elems, fday, count) ptr_cc_id, DIS_HLS_PREF, dvec[4 - 1], 4, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); + holiday (*init_data, detected, _(hd_text[HD_WHIT_MONDAY].ht_text), + ptr_cc_id, year < 2005 ? "+" : DIS_HLS_PREF2, easter + 50, 0, year, + hd_elems, fday, count); } @@ -2862,7 +2866,7 @@ sn_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } diff --git a/src/hd-data5.c b/src/hd-data5.c index c83e839..5e12918 100644 --- a/src/hd-data5.c +++ b/src/hd-data5.c @@ -632,7 +632,7 @@ tt_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", dvec[8 - 1], 8, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -2729,7 +2729,7 @@ vc_hdy (init_data, detected, easter, year, hd_elems, fday, count) holiday (*init_data, detected, _(hd_text[HD_INDEPENDENCE_DAY].ht_text), ptr_cc_id, "+", 27, 10, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } @@ -2890,7 +2890,7 @@ vg_hdy (init_data, detected, easter, year, hd_elems, fday, count) DIS_HLS_PREF, dvec[MONTH_MAX - 1], MONTH_MAX, year, hd_elems, fday, count); base_christian_hdy (init_data, detected, easter, year, hd_elems, fday, - count); + count, ptr_cc_id); } -- 2.7.4