Skip to content

Frontier workers

The rule

A frontier worker lives in one country and works in another, going home at least once a week, often every day: someone living in Forbach, France, who works in Saarbruecken, Germany.

  • Their public holidays are those of the country they work in: Corpus Christi is a holiday at the Saarland site; 8 May, a French holiday, is a working day there.
  • Tax and social security rules for frontier workers count their days in both countries: the days worked in the work country, and the days in the country they live in, which is every day they go home to.

Who uses it

Employers near a border, whose staff commute from the other side: France, Germany, Belgium, Luxembourg, Switzerland, Austria, the Netherlands; Canada and the United States; Singapore and Malaysia.

How the recipe does it

Configuration only. The work location gives the work’s country and lists its holidays; where the person lives is an employment attribute:

[[location]]
id = "saarbruecken"
zone = "Europe/Berlin"
jurisdiction = "de-sl"
values = { country = "de" }
metadata = { holidays = ["neujahr", "fronleichnam", "tag-der-deutschen-einheit"] }
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "saarbruecken"
attributes = { residence = "fr" }

The package (package.toml) has two layers. Holidays, by the work location:

[[layer]]
id = "holidays"
[[layer.step]]
id = "where"
uses = "standard/location_holidays"
[[layer.step]]
id = "holiday-pay"
uses = "standard/holiday_pay"
params = { time = "scheduled", category = "holiday", scheduled_only = true }

Days present, in the country worked in on each day worked, and in the country lived in on every day:

[[layer]]
id = "days-present"
[[layer.step]]
id = "count"
uses = "standard/days_present"
params = { by = "country", measure = "days_present", residence = "residence" }

The work location’s days are not days present here (no located): a frontier worker is at the site on the days they work there, and at home the rest.

What your setup needs

Set up before you adopt the recipe; the recipe’s steps read them by name, and adopting it is refused, with a list of what is missing, until they exist.

  • A measure called days_present: the amount the recipe adds up (money in a currency, or a count).

The scenarios show each as it was set up for them.

Parameters

StepParameterMeaning
location_holidayskeyThe location metadata key the list of holiday ids is kept under (default holidays).
holiday_paytime, category, scheduled_onlyA scheduled day’s hours, in holiday, only on a day with a shift.
days_presentby, measureThe dimension of the country, and the measure the days are reported in.
days_presentresidenceThe employment attribute naming the country lived in: every day employed is a day there.

What the scenarios show

  • the-work-countrys-holidays: Corpus Christi 2026 is paid at the Saarland site; 8 May is worked there.
  • days-present-in-both-countries: a week of 4 days worked in Germany is 4 days present in Germany and 7 in France.

This is a common way to keep a frontier worker’s holidays and days; check the rules where you operate. Who is a frontier worker, which holidays an employment keeps, and how their days are counted for tax (some treaties count the days worked outside a frontier zone, or nights spent away from home) differ by country and treaty: the tax and social security systems decide, from the facts this records.

Get the recipe

The recipe’s package and its scenarios are in the example packages repository: attendance/frontier_workers. 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:

frontier_workers/package.toml
name = "frontier_workers"
version = "1.0.0"
description = "Frontier workers, who live in one country and work in another, going home each day: the public holidays are the work country's, and the days present count both countries."
# What the tenant must have set up for the recipe: the steps read these by name.
[needs]
measures = ["days_present"]
# Everyone: a holiday is observed only where the person's work location
# lists it (its metadata's holidays): the country worked in, not the one
# lived in. A holiday observed on a scheduled day pays its scheduled
# hours, in holiday.
[[layer]]
id = "holidays"
[[layer.step]]
id = "where"
uses = "standard/location_holidays"
[[layer.step]]
id = "holiday-pay"
uses = "standard/holiday_pay"
params = { time = "scheduled", category = "holiday", scheduled_only = true }
# Each day is a day present in the country worked in that day, and in the
# country the person lives in and goes home to (the employment attribute
# residence) on every day they are employed: a count of 1 a day in
# days_present, by country.
[[layer]]
id = "days-present"
[[layer.step]]
id = "count"
uses = "standard/days_present"
params = { by = "country", measure = "days_present", residence = "residence" }

Scenarios

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

Working Monday to Wednesday and Friday in Germany and going home to France each night: 4 days present in Germany, and every day of the week in France, Thursday's holiday and the weekend included
scenarios/days-present-in-both-countries.toml
description = "Working Monday to Wednesday and Friday in Germany and going home to France each night: 4 days present in Germany, and every day of the week in France, Thursday's holiday and the weekend included"
punch = [
{ at = "2026-06-01 08:00", kind = "in" }, { at = "2026-06-01 16:00", kind = "out" },
{ at = "2026-06-02 08:00", kind = "in" }, { at = "2026-06-02 16:00", kind = "out" },
{ at = "2026-06-03 08:00", kind = "in" }, { at = "2026-06-03 16:00", kind = "out" },
{ at = "2026-06-05 08:00", kind = "in" }, { at = "2026-06-05 16:00", kind = "out" },
]
[policy]
zone = "Europe/Berlin"
[[location]]
id = "saarbruecken"
zone = "Europe/Berlin"
jurisdiction = "de-sl"
values = { country = "de" }
metadata = { holidays = ["neujahr", "fronleichnam", "tag-der-deutschen-einheit"] }
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "saarbruecken"
attributes = { residence = "fr" }
[[holiday]]
id = "fronleichnam"
name = "Fronleichnam"
date = "2026-06-04"
[[category]]
id = "holiday"
worked = false
[[measure]]
id = "days_present"
kind = "count"
[[shift_definition]]
id = "days"
start = "08:00"
end = "16:00"
days = ["monday", "tuesday", "wednesday", "thursday", "friday"]
[expect]
week = "2026-06-01"
quantities = [
"2026-06-01 days_present 1 present country=de",
"2026-06-01 days_present 1 present country=fr",
"2026-06-02 days_present 1 present country=de",
"2026-06-02 days_present 1 present country=fr",
"2026-06-03 days_present 1 present country=de",
"2026-06-03 days_present 1 present country=fr",
"2026-06-04 days_present 1 present country=fr",
"2026-06-05 days_present 1 present country=de",
"2026-06-05 days_present 1 present country=fr",
"2026-06-06 days_present 1 present country=fr",
"2026-06-07 days_present 1 present country=fr",
]
Living in Forbach, France, and working in Saarbruecken, Germany: Corpus Christi, Thursday 4 June 2026, is a holiday in the Saarland and is paid; Friday 8 May, a French holiday, is a working day at the German site
scenarios/the-work-countrys-holidays.toml
description = "Living in Forbach, France, and working in Saarbruecken, Germany: Corpus Christi, Thursday 4 June 2026, is a holiday in the Saarland and is paid; Friday 8 May, a French holiday, is a working day at the German site"
punch = [
{ at = "2026-05-08 08:00", kind = "in" }, { at = "2026-05-08 16:00", kind = "out" },
{ at = "2026-06-01 08:00", kind = "in" }, { at = "2026-06-01 16:00", kind = "out" },
{ at = "2026-06-02 08:00", kind = "in" }, { at = "2026-06-02 16:00", kind = "out" },
{ at = "2026-06-03 08:00", kind = "in" }, { at = "2026-06-03 16:00", kind = "out" },
{ at = "2026-06-05 08:00", kind = "in" }, { at = "2026-06-05 16:00", kind = "out" },
]
[policy]
zone = "Europe/Berlin"
[[location]]
id = "saarbruecken"
zone = "Europe/Berlin"
jurisdiction = "de-sl"
values = { country = "de" }
metadata = { holidays = ["neujahr", "fronleichnam", "tag-der-deutschen-einheit"] }
[[employment]]
effective = "2026-01-05"
kind = "hired"
location = "saarbruecken"
attributes = { residence = "fr" }
[[holiday]]
id = "fronleichnam"
name = "Fronleichnam"
date = "2026-06-04"
[[holiday]]
id = "victoire-1945"
name = "Victoire 1945"
month = 5
day = 8
[[category]]
id = "holiday"
worked = false
[[measure]]
id = "days_present"
kind = "count"
[[shift_definition]]
id = "days"
start = "08:00"
end = "16:00"
days = ["monday", "tuesday", "wednesday", "thursday", "friday"]
[expect]
week = "2026-06-01"
worked = "32h"
allocations = [
"2026-06-01 08:00-16:00 work 8.00 country=de",
"2026-06-02 08:00-16:00 work 8.00 country=de",
"2026-06-03 08:00-16:00 work 8.00 country=de",
"2026-06-04 untimed holiday 8.00",
"2026-06-05 08:00-16:00 work 8.00 country=de",
]
[expect.period]
day = "2026-05-08"
allocations = ["2026-05-08 08:00-16:00 work 8.00 country=de"]