Skip to content

Public holidays by location

The rule

Which public holidays a person has depends on where they work, and so does what happens when one falls on a weekend:

  • regions of one country keep different holidays: Scotland keeps 2 January and England does not; Bavaria keeps Epiphany and Berlin keeps International Women’s Day;
  • in the United Kingdom a bank holiday on a Saturday or a Sunday is observed on the next weekday that is not already a holiday (a substitute day): with Christmas on a Saturday and Boxing Day on the Sunday, the Monday and the Tuesday;
  • in Germany a holiday on a weekend stays where it falls, and is paid only where it takes a day that would have been worked.

Who uses it

Any employer with people in more than one country or region. The holidays, their dates and which locations keep them are the tenant’s own data; the rules for weekends are the policy’s.

How the recipe does it

Configuration only: the package (package.toml) has three layers.

[[layer]]
id = "holidays"
[[layer.step]]
id = "where"
uses = "standard/location_holidays"
[[layer.step]]
id = "holiday-pay"
uses = "standard/holiday_pay"
params = { time = "8h", category = "holiday" }
[[layer]]
id = "gb"
applies_to = "jurisdiction in (gb-eng, gb-sct)"
[[layer.step]]
id = "substitute"
uses = "standard/substitute_day"
[[layer]]
id = "de"
applies_to = "jurisdiction in (de-by, de-be)"
[[layer.step]]
id = "holiday-pay"
change = "params"
params = { scheduled_only = true }
  • The tenant keeps one list of holidays (holiday setup items), each with its date or rule. A holiday whose date moves each year (Good Friday, Easter Monday, Whit Monday) is kept as one holiday per year, each of its date.
  • Each work location says which holidays it keeps in its own metadata: { "holidays": ["new-year", "second-of-january", ...] }. location_holidays observes only those, on the days the person works at that location. A location that keeps no list observes every holiday.
  • substitute_day moves a holiday observed on a Saturday or a Sunday to the next weekday no other holiday takes, the holidays taken in the order they fall. It runs after location_holidays, so only the holidays a location keeps take a day.
  • holiday_pay pays 8 hours on each holiday observed; in Germany only on a day with a scheduled shift (scheduled_only).

Parameters

StepParameterMeaning
location_holidayskeyThe location metadata key the list of holiday ids is kept under (default holidays).
substitute_daydaysThe weekdays a holiday moves off (default Saturday and Sunday).
substitute_dayholidaysThe holidays that move (default all).

What the scenarios show

  • england-christmas-on-a-weekend-takes-the-next-two-weekdays: Christmas 2027 on Monday the 27th and Boxing Day on Tuesday the 28th.
  • scotland-keeps-the-second-of-january: New Year’s Day 2028 on Monday the 3rd and 2 January on Tuesday the 4th.
  • england-does-not-keep-the-second-of-january: the same weekend gives London the Monday alone.
  • bavaria-keeps-epiphany-and-a-weekend-holiday-is-not-moved: Epiphany pays its 8 hours; Christmas 2027 on a weekend pays nothing.
  • berlin-keeps-its-own-holidays: no Epiphany, International Women’s Day paid.

This is a common way to keep public holidays by location; check the rules where you operate. Rules change and vary by agreement: the holidays a region keeps, whether a weekend holiday is substituted, and who is paid for a holiday differ by country, region and contract.

Get the recipe

The recipe’s package and its scenarios are in the example packages repository: attendance/public_holidays_by_location. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.

The policy package

The package’s layers, with the standard steps each one runs and their settings:

public_holidays_by_location/package.toml
name = "public_holidays_by_location"
version = "1.0.0"
description = "Public holidays as the tenant's own data: one list of holidays, each work location listing those it keeps, and substitute days where a holiday on a weekend moves to the next free weekday."
# Everyone observes only the holidays their work location lists (its
# metadata's holidays). In the United Kingdom a holiday on a Saturday or a
# Sunday is observed on the next weekday that is not already a holiday;
# elsewhere a weekend holiday stays where it falls. Each holiday observed
# pays 8 hours of holiday, set up as not worked.
[[layer]]
id = "holidays"
[[layer.step]]
id = "where"
uses = "standard/location_holidays"
[[layer.step]]
id = "holiday-pay"
uses = "standard/holiday_pay"
params = { time = "8h", category = "holiday" }
[[layer]]
id = "gb"
applies_to = "jurisdiction in (gb-eng, gb-sct)"
[[layer.step]]
id = "substitute"
uses = "standard/substitute_day"
[[layer]]
id = "de"
applies_to = "jurisdiction in (de-by, de-be)"
[[layer.step]]
id = "holiday-pay"
change = "params"
params = { scheduled_only = true }

Scenarios

Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).

Munich keeps Epiphany, Wednesday 6 January 2027, a scheduled day: 8 hours of holiday pay. In Germany a holiday on a weekend is not moved, and is paid only where it takes a scheduled day: Christmas 2027, a Saturday and a Sunday, is observed where it falls and pays nothing
scenarios/bavaria-keeps-epiphany-and-a-weekend-holiday-is-not-moved.toml
description = "Munich keeps Epiphany, Wednesday 6 January 2027, a scheduled day: 8 hours of holiday pay. In Germany a holiday on a weekend is not moved, and is paid only where it takes a scheduled day: Christmas 2027, a Saturday and a Sunday, is observed where it falls and pays nothing"
[policy]
zone = "Europe/Berlin"
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "munich"
[[location]]
id = "london"
zone = "Europe/London"
jurisdiction = "gb-eng"
metadata = { holidays = ["new-year", "christmas", "boxing-day"] }
[[location]]
id = "glasgow"
zone = "Europe/London"
jurisdiction = "gb-sct"
metadata = { holidays = ["new-year", "second-of-january", "christmas", "boxing-day"] }
[[location]]
id = "munich"
zone = "Europe/Berlin"
jurisdiction = "de-by"
metadata = { holidays = ["neujahr", "heilige-drei-koenige", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[location]]
id = "berlin"
zone = "Europe/Berlin"
jurisdiction = "de-be"
metadata = { holidays = ["neujahr", "frauentag", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[category]]
id = "holiday"
worked = false
[[holiday]]
id = "new-year"
name = "New Year's Day"
month = 1
day = 1
[[holiday]]
id = "second-of-january"
name = "2nd January"
month = 1
day = 2
[[holiday]]
id = "christmas"
name = "Christmas Day"
month = 12
day = 25
[[holiday]]
id = "boxing-day"
name = "Boxing Day"
month = 12
day = 26
[[holiday]]
id = "neujahr"
name = "Neujahr"
month = 1
day = 1
[[holiday]]
id = "heilige-drei-koenige"
name = "Heilige Drei Koenige"
month = 1
day = 6
[[holiday]]
id = "frauentag"
name = "Internationaler Frauentag"
month = 3
day = 8
[[holiday]]
id = "erster-weihnachtstag"
name = "1. Weihnachtstag"
month = 12
day = 25
[[holiday]]
id = "zweiter-weihnachtstag"
name = "2. Weihnachtstag"
month = 12
day = 26
[[shift]]
id = "epiphany"
start = "2027-01-06 08:00"
end = "2027-01-06 16:00"
[expect]
week = "2027-01-04"
allocations = ["2027-01-06 untimed holiday 8.00"]
[expect.period]
day = "2027-12-20"
calendar = ["2027-12-25 holiday erster-weihnachtstag", "2027-12-26 holiday zweiter-weihnachtstag"]
allocations = []
Berlin does not keep Epiphany but keeps International Women's Day: nothing on Wednesday 6 January 2027, 8 hours on Monday 8 March 2027
scenarios/berlin-keeps-its-own-holidays.toml
description = "Berlin does not keep Epiphany but keeps International Women's Day: nothing on Wednesday 6 January 2027, 8 hours on Monday 8 March 2027"
[policy]
zone = "Europe/Berlin"
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "berlin"
[[location]]
id = "london"
zone = "Europe/London"
jurisdiction = "gb-eng"
metadata = { holidays = ["new-year", "christmas", "boxing-day"] }
[[location]]
id = "glasgow"
zone = "Europe/London"
jurisdiction = "gb-sct"
metadata = { holidays = ["new-year", "second-of-january", "christmas", "boxing-day"] }
[[location]]
id = "munich"
zone = "Europe/Berlin"
jurisdiction = "de-by"
metadata = { holidays = ["neujahr", "heilige-drei-koenige", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[location]]
id = "berlin"
zone = "Europe/Berlin"
jurisdiction = "de-be"
metadata = { holidays = ["neujahr", "frauentag", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[category]]
id = "holiday"
worked = false
[[holiday]]
id = "new-year"
name = "New Year's Day"
month = 1
day = 1
[[holiday]]
id = "second-of-january"
name = "2nd January"
month = 1
day = 2
[[holiday]]
id = "christmas"
name = "Christmas Day"
month = 12
day = 25
[[holiday]]
id = "boxing-day"
name = "Boxing Day"
month = 12
day = 26
[[holiday]]
id = "neujahr"
name = "Neujahr"
month = 1
day = 1
[[holiday]]
id = "heilige-drei-koenige"
name = "Heilige Drei Koenige"
month = 1
day = 6
[[holiday]]
id = "frauentag"
name = "Internationaler Frauentag"
month = 3
day = 8
[[holiday]]
id = "erster-weihnachtstag"
name = "1. Weihnachtstag"
month = 12
day = 25
[[holiday]]
id = "zweiter-weihnachtstag"
name = "2. Weihnachtstag"
month = 12
day = 26
[[shift]]
id = "epiphany"
start = "2027-01-06 08:00"
end = "2027-01-06 16:00"
[[shift]]
id = "frauentag"
start = "2027-03-08 08:00"
end = "2027-03-08 16:00"
[expect]
week = "2027-01-04"
allocations = []
[expect.period]
day = "2027-03-08"
calendar = ["2027-03-08 holiday frauentag", "2027-03-08 08:00-16:00 shift"]
allocations = ["2027-03-08 untimed holiday 8.00"]
Christmas 2027 falls on a Saturday and Boxing Day on the Sunday. In London both are substitute days: Christmas on Monday the 27th, and Boxing Day, whose Monday is taken, on Tuesday the 28th. Each pays 8 hours; the weekend itself is no holiday
scenarios/england-christmas-on-a-weekend-takes-the-next-two-weekdays.toml
description = "Christmas 2027 falls on a Saturday and Boxing Day on the Sunday. In London both are substitute days: Christmas on Monday the 27th, and Boxing Day, whose Monday is taken, on Tuesday the 28th. Each pays 8 hours; the weekend itself is no holiday"
[policy]
zone = "Europe/London"
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "london"
[[location]]
id = "london"
zone = "Europe/London"
jurisdiction = "gb-eng"
metadata = { holidays = ["new-year", "christmas", "boxing-day"] }
[[location]]
id = "glasgow"
zone = "Europe/London"
jurisdiction = "gb-sct"
metadata = { holidays = ["new-year", "second-of-january", "christmas", "boxing-day"] }
[[location]]
id = "munich"
zone = "Europe/Berlin"
jurisdiction = "de-by"
metadata = { holidays = ["neujahr", "heilige-drei-koenige", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[location]]
id = "berlin"
zone = "Europe/Berlin"
jurisdiction = "de-be"
metadata = { holidays = ["neujahr", "frauentag", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[category]]
id = "holiday"
worked = false
[[holiday]]
id = "new-year"
name = "New Year's Day"
month = 1
day = 1
[[holiday]]
id = "second-of-january"
name = "2nd January"
month = 1
day = 2
[[holiday]]
id = "christmas"
name = "Christmas Day"
month = 12
day = 25
[[holiday]]
id = "boxing-day"
name = "Boxing Day"
month = 12
day = 26
[[holiday]]
id = "neujahr"
name = "Neujahr"
month = 1
day = 1
[[holiday]]
id = "heilige-drei-koenige"
name = "Heilige Drei Koenige"
month = 1
day = 6
[[holiday]]
id = "frauentag"
name = "Internationaler Frauentag"
month = 3
day = 8
[[holiday]]
id = "erster-weihnachtstag"
name = "1. Weihnachtstag"
month = 12
day = 25
[[holiday]]
id = "zweiter-weihnachtstag"
name = "2. Weihnachtstag"
month = 12
day = 26
[expect]
week = "2027-12-20"
allocations = []
[expect.period]
day = "2027-12-27"
calendar = ["2027-12-27 holiday christmas", "2027-12-28 holiday boxing-day"]
allocations = ["2027-12-27 untimed holiday 8.00", "2027-12-28 untimed holiday 8.00"]
London does not list 2 January: the same weekend gives it New Year's Day alone, on Monday the 3rd, and Tuesday is a working day
scenarios/england-does-not-keep-the-second-of-january.toml
description = "London does not list 2 January: the same weekend gives it New Year's Day alone, on Monday the 3rd, and Tuesday is a working day"
[policy]
zone = "Europe/London"
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "london"
[[location]]
id = "london"
zone = "Europe/London"
jurisdiction = "gb-eng"
metadata = { holidays = ["new-year", "christmas", "boxing-day"] }
[[location]]
id = "glasgow"
zone = "Europe/London"
jurisdiction = "gb-sct"
metadata = { holidays = ["new-year", "second-of-january", "christmas", "boxing-day"] }
[[location]]
id = "munich"
zone = "Europe/Berlin"
jurisdiction = "de-by"
metadata = { holidays = ["neujahr", "heilige-drei-koenige", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[location]]
id = "berlin"
zone = "Europe/Berlin"
jurisdiction = "de-be"
metadata = { holidays = ["neujahr", "frauentag", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[category]]
id = "holiday"
worked = false
[[holiday]]
id = "new-year"
name = "New Year's Day"
month = 1
day = 1
[[holiday]]
id = "second-of-january"
name = "2nd January"
month = 1
day = 2
[[holiday]]
id = "christmas"
name = "Christmas Day"
month = 12
day = 25
[[holiday]]
id = "boxing-day"
name = "Boxing Day"
month = 12
day = 26
[[holiday]]
id = "neujahr"
name = "Neujahr"
month = 1
day = 1
[[holiday]]
id = "heilige-drei-koenige"
name = "Heilige Drei Koenige"
month = 1
day = 6
[[holiday]]
id = "frauentag"
name = "Internationaler Frauentag"
month = 3
day = 8
[[holiday]]
id = "erster-weihnachtstag"
name = "1. Weihnachtstag"
month = 12
day = 25
[[holiday]]
id = "zweiter-weihnachtstag"
name = "2. Weihnachtstag"
month = 12
day = 26
[expect.period]
day = "2028-01-03"
calendar = ["2028-01-03 holiday new-year"]
allocations = ["2028-01-03 untimed holiday 8.00"]
New Year's Day 2028 is a Saturday and 2 January a Sunday. Glasgow keeps both: New Year's Day on Monday the 3rd, 2 January on Tuesday the 4th
scenarios/scotland-keeps-the-second-of-january.toml
description = "New Year's Day 2028 is a Saturday and 2 January a Sunday. Glasgow keeps both: New Year's Day on Monday the 3rd, 2 January on Tuesday the 4th"
[policy]
zone = "Europe/London"
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "glasgow"
[[location]]
id = "london"
zone = "Europe/London"
jurisdiction = "gb-eng"
metadata = { holidays = ["new-year", "christmas", "boxing-day"] }
[[location]]
id = "glasgow"
zone = "Europe/London"
jurisdiction = "gb-sct"
metadata = { holidays = ["new-year", "second-of-january", "christmas", "boxing-day"] }
[[location]]
id = "munich"
zone = "Europe/Berlin"
jurisdiction = "de-by"
metadata = { holidays = ["neujahr", "heilige-drei-koenige", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[location]]
id = "berlin"
zone = "Europe/Berlin"
jurisdiction = "de-be"
metadata = { holidays = ["neujahr", "frauentag", "erster-weihnachtstag", "zweiter-weihnachtstag"] }
[[category]]
id = "holiday"
worked = false
[[holiday]]
id = "new-year"
name = "New Year's Day"
month = 1
day = 1
[[holiday]]
id = "second-of-january"
name = "2nd January"
month = 1
day = 2
[[holiday]]
id = "christmas"
name = "Christmas Day"
month = 12
day = 25
[[holiday]]
id = "boxing-day"
name = "Boxing Day"
month = 12
day = 26
[[holiday]]
id = "neujahr"
name = "Neujahr"
month = 1
day = 1
[[holiday]]
id = "heilige-drei-koenige"
name = "Heilige Drei Koenige"
month = 1
day = 6
[[holiday]]
id = "frauentag"
name = "Internationaler Frauentag"
month = 3
day = 8
[[holiday]]
id = "erster-weihnachtstag"
name = "1. Weihnachtstag"
month = 12
day = 25
[[holiday]]
id = "zweiter-weihnachtstag"
name = "2. Weihnachtstag"
month = 12
day = 26
[expect.period]
day = "2028-01-03"
calendar = ["2028-01-03 holiday new-year", "2028-01-04 holiday second-of-january"]
allocations = ["2028-01-03 untimed holiday 8.00", "2028-01-04 untimed holiday 8.00"]