Skip to content

Two employments in two countries

The rule

A worker can have two employments at once, each with its own employer, contract, pay and records: employed in London by one company of a group and in Dublin by another. The European Union’s limit of 48 hours a week on average applies to the worker, and where the employments are with related employers (or the law counts the worker’s hours across them) the hours of both count toward it. The United States counts the hours of a joint employment together for overtime the same way (joint_employment_overtime).

Who uses it

Groups of companies whose staff hold contracts with entities in more than one country, staffing agencies and their clients, and anyone employing a worker who also works for a related employer.

How the recipe does it

Each employment is its own record, of its own employer; the records of one human share a worker id (hourctl attend employee set ... --worker). Each record is worked out on its own, and a step reads the worker’s other records’ time as they were last worked out (ctx:other_records). When one record’s time changes, the others are worked out again.

The package (package.toml) has one layer:

[[layer]]
id = "working-time"
[[layer.step]]
id = "average"
uses = "standard/average_limit"
params = { over = "48h", weeks = 17, kind = "average_over_48h", others = true }
  • average_limit averages the time of the 17 workweeks to each week’s end; with others, each week counts the worker’s other records’ time too (true: every one; or the employers listed). A week with time in neither is passed over.
  • Each employment flags its own weeks, about its own latest line in the week; its pay does not change.
  • The other records are read as far back as the 17 weeks reach, as the record’s own are.

Parameters

ParameterMeaning
overThe weekly average allowed (48h).
weeksThe reference period, in workweeks (17).
kindThe exception raised.
otherstrue: every other record of the worker counts; or the employers whose records count.

What the scenarios show

  • both-employments-average-past-48-hours: 30 hours a week in London and 25 in Dublin average 55, and the London record flags the week.
  • both-employments-within-48-hours: 30 and 10 average 40, and nothing is flagged.

Whether the hours of two employments count together toward a working time limit depends on the law, the employers’ relationship and any agreement (and an individual opt-out where the law allows one): the layers and the records say it. Check the rules where you operate.

Get the recipe

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

two_employments_in_two_countries/package.toml
name = "two_employments_in_two_countries"
version = "1.0.0"
description = "One worker employed by two employers in two countries: the 48-hour weekly average of the working time limits counts the hours of both employments."
# Everyone: an average over a rolling 17 weeks of more than 48 hours a
# week is flagged, counting the hours of every other employment of the
# same worker in the tenant (their other records, as last worked out).
# Each employment flags its own weeks; nobody's pay changes.
[[layer]]
id = "working-time"
[[layer.step]]
id = "average"
uses = "standard/average_limit"
params = { over = "48h", weeks = 17, kind = "average_over_48h", others = 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).

Employed in London by acme-uk and in Dublin by acme-ie: 30 hours a week in London and 25 in Dublin average 55 hours a week, past 48, and the London record flags each week, though 30 alone would not be
scenarios/both-employments-average-past-48-hours.toml
description = "Employed in London by acme-uk and in Dublin by acme-ie: 30 hours a week in London and 25 in Dublin average 55 hours a week, past 48, and the London record flags each week, though 30 alone would not be"
punch = [
{ at = "2026-09-28 08:00", kind = "in" }, { at = "2026-09-28 18:00", kind = "out" },
{ at = "2026-09-29 08:00", kind = "in" }, { at = "2026-09-29 18:00", kind = "out" },
{ at = "2026-09-30 08:00", kind = "in" }, { at = "2026-09-30 18:00", kind = "out" },
{ at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 18:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 18:00", kind = "out" },
{ at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 18:00", kind = "out" },
]
[policy]
zone = "Europe/London"
[person]
employer = "acme-uk"
worker = "w-17"
[[person.other]]
person = "ie-4471"
employer = "acme-ie"
days = { "2026-10-01" = { work = "12h 30m" }, "2026-10-02" = { work = "12h 30m" }, "2026-10-08" = { work = "12h 30m" }, "2026-10-09" = { work = "12h 30m" } }
[expect]
week = "2026-10-05"
worked = "30h"
exceptions = [{ kind = "average_over_48h", at = "2026-10-07 08:00" }]
30 hours a week in London and 10 in Dublin average 40 hours a week, both employments together: within 48, and nothing is flagged
scenarios/both-employments-within-48-hours.toml
description = "30 hours a week in London and 10 in Dublin average 40 hours a week, both employments together: within 48, and nothing is flagged"
punch = [
{ at = "2026-09-28 08:00", kind = "in" }, { at = "2026-09-28 18:00", kind = "out" },
{ at = "2026-09-29 08:00", kind = "in" }, { at = "2026-09-29 18:00", kind = "out" },
{ at = "2026-09-30 08:00", kind = "in" }, { at = "2026-09-30 18:00", kind = "out" },
{ at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 18:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 18:00", kind = "out" },
{ at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 18:00", kind = "out" },
]
[policy]
zone = "Europe/London"
[person]
employer = "acme-uk"
worker = "w-17"
[[person.other]]
person = "ie-4471"
employer = "acme-ie"
days = { "2026-10-01" = { work = "10h" }, "2026-10-08" = { work = "10h" } }
[expect]
week = "2026-10-05"
worked = "30h"