Skip to content

Habitual work share

The rule

Someone who works in two or more countries is covered by one country’s social security. Within the European Union, a person who does a substantial part of their work in the country they live in (25% or more of their working time) is covered by that country; otherwise, as a rule, by the country of the employer’s seat. Which side of 25% a person is on is reviewed when it changes.

Time and Attendance reports the fact: the share of the time worked in the country of residence over the 12 months to the end of each pay period, flagged when it reaches 25% or falls below it. The decision on coverage is the social security institutions’ and the employer’s.

Who uses it

Employers of people who work in several countries: cross-border commuters, sales and service staff covering regions that span borders, transport crews, remote workers who also work at an office abroad.

How the recipe does it

Configuration only. Each line records its country (a work location’s values, or a clock’s site: work_in_several_countries), and where the person lives is an employment attribute (residence = "be").

The package (package.toml) has one layer with one step:

[[layer]]
id = "work-share"
[[layer.step]]
id = "home-share"
uses = "standard/time_share"
params = { by = "country", value_attribute = "residence", percent = 25, kind = "residence_share_25" }
  • Each pay period, time_share adds up the time worked in the 12 months to its last day by country, and to the day before its first.
  • Where the share of the country the person lives in reaches 25% over the one having been below over the other, or falls below it, it raises residence_share_25, saying the share: once, when the side changes.
  • Time with no country counts toward the whole only.

Parameters

ParameterMeaning
byThe dimension whose values are the countries (country).
value_attributeThe employment attribute naming the country looked at (residence); without it, every country.
percentThe share flagged (25).
kindThe exception raised.
withinThe span counted: the 12 months (the default, { last = "12mo" }), a year at most.

What the scenarios show

  • a-quarter-of-the-time-at-home-is-flagged: living in Belgium and working in the Netherlands, a week with 3 days in Belgium brings its share to 30%, and it is flagged.
  • a-day-a-week-at-home-is-not-flagged: a day in Belgium in two weeks is 10%, and nothing is flagged.
  • falling-below-a-quarter-is-flagged: the days in Belgium a year ago leave the 12 months, its share falls below 25%, and the fall is flagged.

This is a common way to watch the share of working time for a social security review; check the rules where you operate. Which country covers a person depends on more than working time (remuneration, where the employer is, agreements between countries, the period looked ahead as well as back): the social security institutions decide, from the facts this records.

Get the recipe

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

habitual_work_share/package.toml
name = "habitual_work_share"
version = "1.0.0"
description = "The share of working time a person does in the country they live in, over a rolling 12 months, flagged for a social security review when it reaches 25% or falls below it."
# Everyone: each pay period, the share of the time worked in the 12
# months to its end done in the country the person lives in (the
# employment attribute residence; the country is the work's country) is
# compared with the share to the day before it began. Reaching 25%, or
# falling below it, raises residence_share_25 for review.
[[layer]]
id = "work-share"
[[layer.step]]
id = "home-share"
uses = "standard/time_share"
params = { by = "country", value_attribute = "residence", percent = 25, kind = "residence_share_25" }

Scenarios

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

Living in Belgium and working a day a fortnight there: Belgium's share of the 12 months is 10%, under 25%, and nothing is flagged; the Netherlands' share is not looked at, the person living in Belgium
scenarios/a-day-a-week-at-home-is-not-flagged.toml
description = "Living in Belgium and working a day a fortnight there: Belgium's share of the 12 months is 10%, under 25%, and nothing is flagged; the Netherlands' share is not looked at, the person living in Belgium"
punch = [
{ at = "2026-09-28 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-09-28 16:00", kind = "out" },
{ at = "2026-09-29 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-09-29 16:00", kind = "out" },
{ at = "2026-09-30 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-09-30 16:00", kind = "out" },
{ at = "2026-10-01 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-01 16:00", kind = "out" },
{ at = "2026-10-02 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-02 16:00", kind = "out" },
{ at = "2026-10-05 08:00", kind = "in", values = { country = "be" } }, { at = "2026-10-05 16:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-06 16:00", kind = "out" },
{ at = "2026-10-07 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-07 16:00", kind = "out" },
{ at = "2026-10-08 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-08 16:00", kind = "out" },
{ at = "2026-10-09 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-09 16:00", kind = "out" },
]
[policy]
zone = "Europe/Brussels"
[[employment]]
effective = "2026-09-28"
kind = "hired"
attributes = { residence = "be" }
[expect]
week = "2026-10-05"
Living in Belgium and working in the Netherlands: a week of 3 days in Belgium brings Belgium's share of the 12 months to 30%, past 25%, and it is flagged for review
scenarios/a-quarter-of-the-time-at-home-is-flagged.toml
description = "Living in Belgium and working in the Netherlands: a week of 3 days in Belgium brings Belgium's share of the 12 months to 30%, past 25%, and it is flagged for review"
punch = [
{ at = "2026-09-28 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-09-28 16:00", kind = "out" },
{ at = "2026-09-29 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-09-29 16:00", kind = "out" },
{ at = "2026-09-30 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-09-30 16:00", kind = "out" },
{ at = "2026-10-01 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-01 16:00", kind = "out" },
{ at = "2026-10-02 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-02 16:00", kind = "out" },
{ at = "2026-10-05 08:00", kind = "in", values = { country = "be" } }, { at = "2026-10-05 16:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in", values = { country = "be" } }, { at = "2026-10-06 16:00", kind = "out" },
{ at = "2026-10-07 08:00", kind = "in", values = { country = "be" } }, { at = "2026-10-07 16:00", kind = "out" },
{ at = "2026-10-08 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-08 16:00", kind = "out" },
{ at = "2026-10-09 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-09 16:00", kind = "out" },
]
[policy]
zone = "Europe/Brussels"
[[employment]]
effective = "2026-09-28"
kind = "hired"
attributes = { residence = "be" }
[expect]
week = "2026-10-05"
exceptions = [{ kind = "residence_share_25", at = "2026-10-07 08:00" }]
Two days in Belgium a year ago, and since then work only in the Netherlands: Belgium's share of the rolling 12 months is 29% until that week leaves them, in the week of 26 October 2026, when it falls to none, below 25%, and the fall is flagged for review too
scenarios/falling-below-a-quarter-is-flagged.toml
description = "Two days in Belgium a year ago, and since then work only in the Netherlands: Belgium's share of the rolling 12 months is 29% until that week leaves them, in the week of 26 October 2026, when it falls to none, below 25%, and the fall is flagged for review too"
punch = [
{ at = "2025-10-27 08:00", kind = "in", values = { country = "be" } }, { at = "2025-10-27 16:00", kind = "out" },
{ at = "2025-10-28 08:00", kind = "in", values = { country = "be" } }, { at = "2025-10-28 16:00", kind = "out" },
{ at = "2025-10-29 08:00", kind = "in", values = { country = "nl" } }, { at = "2025-10-29 16:00", kind = "out" },
{ at = "2025-10-30 08:00", kind = "in", values = { country = "nl" } }, { at = "2025-10-30 16:00", kind = "out" },
{ at = "2025-10-31 08:00", kind = "in", values = { country = "nl" } }, { at = "2025-10-31 16:00", kind = "out" },
{ at = "2026-10-12 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-12 16:00", kind = "out" },
{ at = "2026-10-13 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-13 16:00", kind = "out" },
{ at = "2026-10-26 08:00", kind = "in", values = { country = "nl" } }, { at = "2026-10-26 16:00", kind = "out" },
]
[policy]
zone = "Europe/Brussels"
[[employment]]
effective = "2025-10-27"
kind = "hired"
attributes = { residence = "be" }
[expect]
week = "2026-10-26"
exceptions = [{ kind = "residence_share_25", at = "2026-10-26 00:00" }]