You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uk-holidays describe New Year bank holiday, being on January 1st except if this is SAT or SUN, then next Monday:
(defun holiday-new-year-bank-holiday ()
(let ((m displayed-month)
(y displayed-year))
(calendar-increment-month m y 1)
(when (<= m 3)
(let ((d (calendar-day-of-week (list 1 1 y))))
(cond ((= d 6) `(((1 3 ,y) "New Year's Day Bank Holiday")))
((= d 0) `(((1 2 ,y) "New Year's Day Bank Holiday"))))))))
(defun holiday-christmas-bank-holidays ()
(let ((m displayed-month)
(y displayed-year))
(calendar-increment-month m y -1)
(when (>= m 10)
(let ((d (calendar-day-of-week (list 12 25 y))))
(cond ((= d 5) `(((12 28 ,y) "Boxing Day Bank Holiday")))
((= d 6) `(((12 27 ,y) "Boxing Day Bank Holiday")
((12 28 ,y) "Christmas Day Bank Holiday")))
((= d 0) `(((12 27 ,y) "Christmas Day Bank Holiday"))))))))
In the following table X and B are Christmas and Boxing holidays defined anyway with a fixed date.
X2 and B2 are potential additional Christmas and Boxing holidays depending on the day of week of Dec 25th.
Case
25
26
27
28
Description
FRI
SAT
SUN
MON
1
X
B
-
B2
if DEC 25 is a FRI then 12 28 Boxing Day Bank Holiday
SAT
SUN
MON
TUE
2
X
B
B2
X2
if DEC 25 is a SAT then 12 27 Boxing Day Bank Holiday and 12 28 Christmas Day Bank Holiday
SUN
MON
TUE
WED
3
X
B
X2
if DEC 25 is a SUN then 12 27 Christmas Day Bank Holiday
Ideas for configuration file syntax
holiday either 4 27 or -1 if SUN Koningsdag
holiday if 4 27 is SUN then 4 26 Koningsdag
holiday except SUN 4 27 else 4 26 Koningsdag
holiday if-not SUN then 4 27 else 1 day before Koningsdag
holiday either fixed 4 27 or if SUN then fixed 4 26 Koningsdag
# leads to two holidays on Jan 1st in other cases
holiday either fixed JAN 1 or if SAT,SUN then float 1 MON after JAN 1 New Year's Day Bank Holiday
# leads to two Boxing holidays on Dec 26 in other cases
holiday either fixed DEC 26 or if SAT,SUN then float 1 MON after DEC 26 Boxing Day Bank Holiday
# leads to two Christmas holidays on Dec 25 in other cases
holiday either fixed DEC 25 or if SAT,SUN then float 1 TUE after DEC 25 Christmas Day Bank Holiday
The text was updated successfully, but these errors were encountered:
Maybe we should make a difference between conditional holidays and holidays with alternative dates?
conditional holidays may be skipped in particular years without replacement, example holiday if DEC 26 is SAT,SUN then float 1 MON after DEC 26 Boxing Day Bank Holiday
holidays with alternative dates occur every year, but date may be different, example holiday either 4 27 or if SUN then fixed 4 26 Koningsdag
e.g. UK and Netherlands have cases in which
Examples
Dutch holidays contains the following code meaning: if April 27 is a Sunday then April 26, otherwise April 27:
Uk-holidays describe New Year bank holiday, being on January 1st except if this is SAT or SUN, then next Monday:
In the following table X and B are Christmas and Boxing holidays defined anyway with a fixed date.
X2 and B2 are potential additional Christmas and Boxing holidays depending on the day of week of Dec 25th.
Ideas for configuration file syntax
The text was updated successfully, but these errors were encountered: