Skip to content

Overtime equalization counts

The rule

  • Overtime is shared out evenly: the next hours go to whoever has been offered the fewest so far in the equalization period (here the calendar year).
  • An hour of overtime offered and refused counts as offered, as if worked: refusing does not move a person to the front of the list.
  • The counts start again with each equalization period.

The engine keeps the counts. Who is offered the next overtime is the app’s decision, made from them.

Who uses it

Unionized plants, utilities and public employers whose collective agreements require overtime to be equalized among the people in a classification or department.

How the recipe does it

Configuration only: a package (package.toml) of one layer, paid weekly, with overtime past 40 hours a week and the standard accrue and carryover steps keeping three counts as balances.

[[layer]]
id = "equalization"
settings = { pay_periods = { every_days = 7, from = "2026-09-28" }, accruals = { since = "2026-09-28" } }
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "40h", to = "overtime", window = "week" }
[[layer.step]]
id = "worked"
uses = "standard/accrue"
params = { category = "overtime_worked", earn = "1h", per = "1h", counts = ["overtime"], window = "day" }
[[layer.step]]
id = "refused"
uses = "standard/accrue"
params = { category = "overtime_refused", earn = "1h", per = "1h", counts = ["overtime_refused"], window = "day" }
[[layer.step]]
id = "offered"
uses = "standard/accrue"
params = { category = "overtime_offered", earn = "1h", per = "1h", counts = ["overtime", "overtime_refused"], window = "day" }
[[layer.step]]
id = "new-year-worked"
uses = "standard/carryover"
params = { category = "overtime_worked", limit = "0h" }
# and new-year-refused, new-year-offered alike
  • Overtime refused is a fact recorded as such: the app records a labor entry of the hours refused, on the day they were offered, in the pay category overtime_refused, set up as neither worked nor paid. It pays nothing and counts toward no threshold.
  • Each count is an accrual category drawn down by nothing. accrue adds an hour for each hour in the categories it counts, on the day (window = "day"): overtime_worked the overtime, overtime_refused the hours refused, overtime_offered both.
  • carryover with a limit of nothing takes each count off as the year starts; it runs after the accrue steps, so the hours of the days before January 1 in a pay period across the new year are taken off too, and those from January 1 on start the new year’s count.
  • Each ledger carries the counts as they stand at the end of its pay period (balances), and a close carries them forward: the app reads them for everyone in the classification and ranks them. A hand adjustment sets a count where the shop started counting on paper.

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 balance called overtime_offered: an accrual category. The recipe earns into it, takes from it or reads it.
  • A balance called overtime_refused: an accrual category. The recipe earns into it, takes from it or reads it.
  • A balance called overtime_worked: an accrual category. The recipe earns into it, takes from it or reads it.

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

Parameters

StepParameterMeaning
worked, refused, offeredcategoryThe count: an accrual category the tenant sets up.
worked, refused, offeredcountsThe pay categories counted.
worked, refused, offeredearn, per, windowAn hour for each hour, on its day.
new-year-*limit"0h": the whole count is taken off.
new-year-*yearThe equalization period: the calendar year by default; { every = "3mo", starts = "01-01" } for quarters.

What the scenarios show

  • overtime-worked-refused-and-offered: two weeks’ overtime and a refusal are 7 hours worked, 4 refused and 11 offered.
  • the-counts-start-again-each-year: in the pay period across the new year, the year’s counts are taken off as January 1 starts and the overtime of January 2 is the new year’s first.
  • a-contract-that-equalizes-each-quarter: a contract’s own layer counts by the quarter.

This is a common way employers keep overtime equalization counts; check the collective agreement that applies. Which overtime is equalized (by classification, department or shift), whether a refusal or an absence counts as hours offered, and how disputes are settled are the agreement’s to decide.

Get the recipe

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

overtime_equalization/package.toml
name = "overtime_equalization"
version = "1.0.0"
description = "Overtime equalization counts for a union shop - each person's overtime hours worked, refused and offered so far in the year, kept as balances the app reads to offer the next overtime evenly."
# What the tenant must have set up for the recipe: the steps read these by name.
[needs]
accrual_categories = ["overtime_offered", "overtime_refused", "overtime_worked"]
# Paid weekly; overtime is time past 40 hours a week. Each person's counts
# are balances (accrual categories drawn down by nothing): every hour of
# overtime worked adds an hour to overtime_worked, every hour of overtime
# refused (a labor entry of hours in the category overtime_refused, set up
# as neither worked nor paid) to overtime_refused, and both to
# overtime_offered, each on its day. As January 1 starts, the counts of
# the year before are taken off, so each year's start from nothing.
[[layer]]
id = "equalization"
settings = { pay_periods = { every_days = 7, from = "2026-09-28" }, accruals = { since = "2026-09-28" } }
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "40h", to = "overtime", window = "week" }
[[layer.step]]
id = "worked"
uses = "standard/accrue"
params = { category = "overtime_worked", earn = "1h", per = "1h", counts = ["overtime"], window = "day" }
[[layer.step]]
id = "refused"
uses = "standard/accrue"
params = { category = "overtime_refused", earn = "1h", per = "1h", counts = ["overtime_refused"], window = "day" }
[[layer.step]]
id = "offered"
uses = "standard/accrue"
params = { category = "overtime_offered", earn = "1h", per = "1h", counts = ["overtime", "overtime_refused"], window = "day" }
[[layer.step]]
id = "new-year-worked"
uses = "standard/carryover"
params = { category = "overtime_worked", limit = "0h" }
[[layer.step]]
id = "new-year-refused"
uses = "standard/carryover"
params = { category = "overtime_refused", limit = "0h" }
[[layer.step]]
id = "new-year-offered"
uses = "standard/carryover"
params = { category = "overtime_offered", limit = "0h" }

Scenarios

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

A contract that equalizes overtime each quarter (its own layer gives the steps that take the counts off a year of 3 months): the 20 hours worked counted on Monday September 28 are taken off as October 1 starts, and Friday's 5 hours of overtime are the quarter's first
scenarios/a-contract-that-equalizes-each-quarter.toml
description = "A contract that equalizes overtime each quarter (its own layer gives the steps that take the counts off a year of 3 months): the 20 hours worked counted on Monday September 28 are taken off as October 1 starts, and Friday's 5 hours of overtime are the quarter's first"
punch = [
{ at = "2026-09-28 07:00", kind = "in" }, { at = "2026-09-28 16:00", kind = "out" },
{ at = "2026-09-29 07:00", kind = "in" }, { at = "2026-09-29 16:00", kind = "out" },
{ at = "2026-09-30 07:00", kind = "in" }, { at = "2026-09-30 16:00", kind = "out" },
{ at = "2026-10-01 07:00", kind = "in" }, { at = "2026-10-01 16:00", kind = "out" },
{ at = "2026-10-02 07:00", kind = "in" }, { at = "2026-10-02 16:00", kind = "out" },
]
[policy]
zone = "America/Detroit"
[[layer]]
id = "quarterly"
[[layer.step]]
id = "new-year-worked"
change = "params"
params = { year = { every = "3mo", starts = "01-01" } }
[[layer.step]]
id = "new-year-refused"
change = "params"
params = { year = { every = "3mo", starts = "01-01" } }
[[layer.step]]
id = "new-year-offered"
change = "params"
params = { year = { every = "3mo", starts = "01-01" } }
[[category]]
id = "overtime_refused"
worked = false
paid = false
[[accrual_category]]
id = "overtime_worked"
uses = []
[[accrual_category]]
id = "overtime_refused"
uses = []
[[accrual_category]]
id = "overtime_offered"
uses = []
[[accrual_adjustment]]
category = "overtime_worked"
workday = "2026-09-28"
amount = "20h"
[expect.period]
day = "2026-09-28"
accruals = [
"2026-09-28 overtime_worked adjusted 20h",
"2026-10-02 overtime_worked earned 5h",
"2026-10-02 overtime_offered earned 5h",
"2026-10-01 overtime_worked forfeited -20h",
]
balances = { overtime_worked = "5h", overtime_offered = "5h" }
In the first week 45 hours worked are 5 of overtime, and 4 hours offered on Saturday were refused (recorded as such); in the second, 42 hours are 2 more of overtime. The counts at the second week's end: 7 hours worked, 4 refused, 11 offered
scenarios/overtime-worked-refused-and-offered.toml
description = "In the first week 45 hours worked are 5 of overtime, and 4 hours offered on Saturday were refused (recorded as such); in the second, 42 hours are 2 more of overtime. The counts at the second week's end: 7 hours worked, 4 refused, 11 offered"
punch = [
{ at = "2026-09-28 07:00", kind = "in" }, { at = "2026-09-28 16:00", kind = "out" },
{ at = "2026-09-29 07:00", kind = "in" }, { at = "2026-09-29 16:00", kind = "out" },
{ at = "2026-09-30 07:00", kind = "in" }, { at = "2026-09-30 16:00", kind = "out" },
{ at = "2026-10-01 07:00", kind = "in" }, { at = "2026-10-01 16:00", kind = "out" },
{ at = "2026-10-02 07:00", kind = "in" }, { at = "2026-10-02 16:00", kind = "out" },
{ at = "2026-10-05 07:00", kind = "in" }, { at = "2026-10-05 15:00", kind = "out" },
{ at = "2026-10-06 07:00", kind = "in" }, { at = "2026-10-06 15:00", kind = "out" },
{ at = "2026-10-07 07:00", kind = "in" }, { at = "2026-10-07 15:00", kind = "out" },
{ at = "2026-10-08 07:00", kind = "in" }, { at = "2026-10-08 15:00", kind = "out" },
{ at = "2026-10-09 07:00", kind = "in" }, { at = "2026-10-09 17:00", kind = "out" },
]
[policy]
zone = "America/Detroit"
[[measure]]
id = "hours"
kind = "duration"
[[category]]
id = "overtime_refused"
worked = false
paid = false
[[accrual_category]]
id = "overtime_worked"
uses = []
[[accrual_category]]
id = "overtime_refused"
uses = []
[[accrual_category]]
id = "overtime_offered"
uses = []
[[labor]]
workday = "2026-10-03"
measure = "hours"
quantity = "4h"
category = "overtime_refused"
[expect]
week = "2026-09-28"
allocations = [
"2026-09-28 07:00-16:00 work 9.00",
"2026-09-29 07:00-16:00 work 9.00",
"2026-09-30 07:00-16:00 work 9.00",
"2026-10-01 07:00-16:00 work 9.00",
"2026-10-02 07:00-11:00 work 4.00",
"2026-10-02 11:00-16:00 overtime 5.00",
"2026-10-03 untimed overtime_refused 4.00",
]
[expect.period]
day = "2026-10-05"
accruals = [
"2026-10-09 overtime_worked earned 2h",
"2026-10-09 overtime_offered earned 2h",
]
balances = { overtime_worked = "7h", overtime_refused = "4h", overtime_offered = "11h" }
The counts of the year are taken off as January 1 starts, in the pay period across the new year: the 30 hours worked and 4 refused counted before it (entered by hand when the counts were started) and the 4 refused on December 29 are gone; the 8 hours of overtime worked on Saturday January 2 are the new year's first
scenarios/the-counts-start-again-each-year.toml
description = "The counts of the year are taken off as January 1 starts, in the pay period across the new year: the 30 hours worked and 4 refused counted before it (entered by hand when the counts were started) and the 4 refused on December 29 are gone; the 8 hours of overtime worked on Saturday January 2 are the new year's first"
punch = [
{ at = "2026-12-28 07:00", kind = "in" }, { at = "2026-12-28 17:00", kind = "out" },
{ at = "2026-12-29 07:00", kind = "in" }, { at = "2026-12-29 17:00", kind = "out" },
{ at = "2026-12-30 07:00", kind = "in" }, { at = "2026-12-30 17:00", kind = "out" },
{ at = "2026-12-31 07:00", kind = "in" }, { at = "2026-12-31 17:00", kind = "out" },
{ at = "2027-01-02 07:00", kind = "in" }, { at = "2027-01-02 15:00", kind = "out" },
]
[policy]
zone = "America/Detroit"
[[measure]]
id = "hours"
kind = "duration"
[[category]]
id = "overtime_refused"
worked = false
paid = false
[[accrual_category]]
id = "overtime_worked"
uses = []
[[accrual_category]]
id = "overtime_refused"
uses = []
[[accrual_category]]
id = "overtime_offered"
uses = []
[[accrual_adjustment]]
category = "overtime_worked"
workday = "2026-12-21"
amount = "30h"
[[accrual_adjustment]]
category = "overtime_refused"
workday = "2026-12-21"
amount = "4h"
[[accrual_adjustment]]
category = "overtime_offered"
workday = "2026-12-21"
amount = "34h"
[[labor]]
workday = "2026-12-29"
measure = "hours"
quantity = "4h"
category = "overtime_refused"
[expect.period]
day = "2026-12-28"
first = "2026-12-28"
last = "2027-01-03"
accruals = [
"2027-01-02 overtime_worked earned 8h",
"2026-12-29 overtime_refused earned 4h",
"2026-12-29 overtime_offered earned 4h",
"2027-01-02 overtime_offered earned 8h",
"2027-01-01 overtime_worked forfeited -30h",
"2027-01-01 overtime_refused forfeited -8h",
"2027-01-01 overtime_offered forfeited -38h",
]
balances = { overtime_worked = "8h", overtime_refused = "0s", overtime_offered = "8h" }