Daily overtime past 12 hours (Colorado style)
The rule
- Hours past 12 in a workday are overtime.
- Hours past 12 consecutive hours are overtime, whatever workday they fall in: a shift from 18:00 to 08:00 is 14 hours though neither workday has more than 8.
- Hours past 40 in a workweek are overtime, counting only the hours not already paid as daily overtime: an hour is overtime once, whichever rule reaches it first.
Who uses it
Employers in Colorado, and others whose rule or contract pays overtime after long days (12-hour shift operations: hospitals, plants, security) on top of the weekly rule.
How the recipe does it
Configuration only: a package (package.toml) of one layer. The standard
attribute step cuts a shift across midnight there, each piece its own
day’s; then three standard threshold steps, daily first.
[[layer]]id = "overtime"[[layer.step]]id = "split"uses = "standard/attribute"params = { mode = "split" }[[layer.step]]id = "daily"uses = "standard/threshold"params = { over = "12h", to = "overtime", window = "day" }[[layer.step]]id = "consecutive"uses = "standard/threshold"params = { over = "12h", to = "overtime", window = "24h", counts = ["work"] }[[layer.step]]id = "weekly"uses = "standard/threshold"params = { over = "40h", to = "overtime", window = "week", counts = ["work"] }The daily step moves each workday’s time past 12 hours to overtime. The
consecutive step counts in 24-hour windows instead of workdays: each from
the start of the first work not in an earlier one (window = "24h"), so a
shift across midnight is counted whole from when it started; lines across a
window’s end are cut there. It counts only work, what the daily step left
regular. The weekly step then counts only work too, so overtime is not
counted toward 40 a second time.
Parameters
| Step | Parameter | Meaning |
|---|---|---|
| daily | over | "12h". |
| consecutive | over, window, counts | "12h", "24h", ["work"]. |
| weekly | over | "40h". |
| weekly | counts | ["work"]: only regular time counts toward the weekly threshold. |
| both | to | The overtime category. |
What the scenarios show
twelve-hours-and-a-minute: exactly 12 hours is regular, a minute more is a minute of overtime.daily-then-weekly-without-counting-twice: four 13-hour days are 4 hours of daily and 8 of weekly overtime, 12 in all.forty-regular-after-daily-overtime: 43 hours with 3 daily overtime leave exactly 40 regular, and nothing more is overtime.twelve-hours-across-midnight: a 14-hour night shift split at midnight (6 and 8 hours) has its last 2 hours as overtime, counted from its start; the next evening’s shift starts a new 24 hours.
Legal note
This is a common way companies implement Colorado-style overtime; check the rules where you operate. The 24-hour window counts all work within 24 hours of when it started, so two separate shifts in one window count together: stricter than counting only work without a break, never less. Exemptions and industry-specific rules differ.
Get the recipe
The recipe’s package and its scenarios are in the example packages repository: attendance/colorado_overtime. 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:
name = "colorado_overtime"version = "1.0.0"description = "Hours past 12 in a workday, or past 12 counted from when the work started, are overtime, and regular hours past 40 in a workweek are overtime, without counting an hour twice."
# A shift across midnight is cut there, each piece its own day's. Time# past 12 hours a day is overtime; so is regular time past 12 hours in a# 24-hour window from the start of the work; then regular time past 40# hours a week. The later steps count only what the earlier ones left# regular, so no hour is overtime twice.[[layer]]id = "overtime"[[layer.step]]id = "split"uses = "standard/attribute"params = { mode = "split" }[[layer.step]]id = "daily"uses = "standard/threshold"params = { over = "12h", to = "overtime", window = "day" }[[layer.step]]id = "consecutive"uses = "standard/threshold"params = { over = "12h", to = "overtime", window = "24h", counts = ["work"] }[[layer.step]]id = "weekly"uses = "standard/threshold"params = { over = "40h", to = "overtime", window = "week", counts = ["work"] }Scenarios
Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).
Four 13-hour days: each day's thirteenth hour is daily overtime (4 hours); the weekly threshold counts only the 48 regular hours left, so 8 more go to overtime, Thursday's latest. 52 hours worked: 40 regular, 12 overtime, none counted twice
description = "Four 13-hour days: each day's thirteenth hour is daily overtime (4 hours); the weekly threshold counts only the 48 regular hours left, so 8 more go to overtime, Thursday's latest. 52 hours worked: 40 regular, 12 overtime, none counted twice"
punch = [ { at = "2026-10-05 06:00", kind = "in" }, { at = "2026-10-05 19:00", kind = "out" }, { at = "2026-10-06 06:00", kind = "in" }, { at = "2026-10-06 19:00", kind = "out" }, { at = "2026-10-07 06:00", kind = "in" }, { at = "2026-10-07 19:00", kind = "out" }, { at = "2026-10-08 06:00", kind = "in" }, { at = "2026-10-08 19:00", kind = "out" },]
[policy]zone = "America/Denver"
[expect]week = "2026-10-05"worked = "52h"paid = "52.00"allocations = [ "2026-10-05 06:00-18:00 work 12.00", "2026-10-05 18:00-19:00 overtime 1.00", "2026-10-06 06:00-18:00 work 12.00", "2026-10-06 18:00-19:00 overtime 1.00", "2026-10-07 06:00-18:00 work 12.00", "2026-10-07 18:00-19:00 overtime 1.00", "2026-10-08 06:00-10:00 work 4.00", "2026-10-08 10:00-18:00 overtime 8.00", "2026-10-08 18:00-19:00 overtime 1.00",]43 hours worked, 3 of them daily overtime: the 40 regular hours left are exactly the weekly threshold, so nothing more is overtime. Counting every worked hour toward 40 would wrongly have made 3 more
description = "43 hours worked, 3 of them daily overtime: the 40 regular hours left are exactly the weekly threshold, so nothing more is overtime. Counting every worked hour toward 40 would wrongly have made 3 more"
punch = [ { at = "2026-10-05 06:00", kind = "in" }, { at = "2026-10-05 19:00", kind = "out" }, { at = "2026-10-06 06:00", kind = "in" }, { at = "2026-10-06 19:00", kind = "out" }, { at = "2026-10-07 06:00", kind = "in" }, { at = "2026-10-07 19:00", kind = "out" }, { at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 12:00", kind = "out" },]
[policy]zone = "America/Denver"
[expect]week = "2026-10-05"worked = "43h"allocations = [ "2026-10-05 06:00-18:00 work 12.00", "2026-10-05 18:00-19:00 overtime 1.00", "2026-10-06 06:00-18:00 work 12.00", "2026-10-06 18:00-19:00 overtime 1.00", "2026-10-07 06:00-18:00 work 12.00", "2026-10-07 18:00-19:00 overtime 1.00", "2026-10-09 08:00-12:00 work 4.00",]A 14-hour shift from Monday 18:00 to Tuesday 08:00, its hours counted in the workday they are worked in (split at midnight): Monday has 6 hours and Tuesday 8, neither past 12. Counted from when the work started, it is 14 hours within 24: its last 2 hours are overtime. Tuesday evening's next shift starts the next 24 hours, which it alone is in
description = "A 14-hour shift from Monday 18:00 to Tuesday 08:00, its hours counted in the workday they are worked in (split at midnight): Monday has 6 hours and Tuesday 8, neither past 12. Counted from when the work started, it is 14 hours within 24: its last 2 hours are overtime. Tuesday evening's next shift starts the next 24 hours, which it alone is in"
punch = [ { at = "2026-10-05 18:00", kind = "in" }, { at = "2026-10-06 08:00", kind = "out" }, { at = "2026-10-06 20:00", kind = "in" }, { at = "2026-10-07 04:00", kind = "out" },]
[policy]zone = "America/Denver"
[expect]week = "2026-10-05"worked = "22h"allocations = [ "2026-10-05 18:00-2026-10-06 00:00 work 6.00", "2026-10-06 00:00-06:00 work 6.00", "2026-10-06 06:00-08:00 overtime 2.00", "2026-10-06 20:00-2026-10-07 00:00 work 4.00", "2026-10-07 00:00-04:00 work 4.00",]A 12-hour day is all regular; 12 hours and a minute is a minute of overtime, the day's last. Neither week passes 40 regular hours
description = "A 12-hour day is all regular; 12 hours and a minute is a minute of overtime, the day's last. Neither week passes 40 regular hours"
punch = [ { at = "2026-10-05 06:00", kind = "in" }, { at = "2026-10-05 18:00", kind = "out" }, { at = "2026-10-06 06:00", kind = "in" }, { at = "2026-10-06 18:01", kind = "out" },]
[policy]zone = "America/Denver"
[expect]week = "2026-10-05"worked = "24h 1m"allocations = [ "2026-10-05 06:00-18:00 work 12.00", "2026-10-06 06:00-18:00 work 12.00", "2026-10-06 18:00-18:01 overtime 0.01",]