Skip to content

Hours limits for minors

The rule

Young workers may work only so many hours a day and a week, and not late in the evening or early in the morning. A minor who works more than 8 hours in a day, more than 40 in a week, or between 19:00 and 07:00 is flagged so a supervisor can act (and the schedule can be fixed). The time worked is still paid.

Who uses it

Retail, restaurants, cinemas, amusement parks, grocery stores: employers of high-school students and other workers under 18, where the limits change by age, by school term and by place.

How the recipe does it

Configuration only: a package (package.toml) of one policy layer that applies to minors, holding three standard steps. Each raises an exception about a line of the ledger; none moves time.

[[layer]]
id = "minors"
applies_to = "attributes.minor = true"
[[layer.step]]
id = "minor-daily"
uses = "standard/limit"
params = { over = "8h", kind = "minor_daily_limit" }
[[layer.step]]
id = "minor-weekly"
uses = "standard/limit"
params = { window = "week", over = "40h", kind = "minor_weekly_limit" }
[[layer.step]]
id = "minor-night"
uses = "standard/work_during"
params = { during = { daily = { from = "19:00", to = "07:00" } }, kind = "minor_late_work" }
  • Who is a minor is an employment attribute HR keeps: minor = true. The layer’s eligibility rule picks the days it is true; when it changes (a birthday), the change is recorded from that day, and the layer applies up to it.
  • minor-daily: more than 8 hours worked in a workday raises minor_daily_limit about the day’s latest line.
  • minor-weekly: more than 40 hours in a workweek raises minor_weekly_limit about the week’s latest line. Only the days worked as a minor count toward it.
  • minor-night: work in the hours from 19:00 to 07:00 (on the wall clock in force each day, the days the clocks change too) raises minor_late_work about the day’s latest line with time in them.

Parameters

StepParameterMeaning
minor-dailyover, kindWorked time a minor may have in a workday ("8h"), and the exception past it.
minor-weeklywindow, over, kindThe workweek, the worked time a minor may have in it ("40h"), and the exception past it.
minor-nightduring, kindThe hours a minor may not work (a period: { daily = { from = "19:00", to = "07:00" } }), and the exception for work in them.

Limits that vary by school term or age are further layers with from/to dates, or picked by other attributes (applies_to = "attributes.age_band = under_16"), changing these steps’ parameters (change = "params").

What the scenarios show

  • a-day-at-the-limit-and-a-minute-over: exactly 8 hours and out at exactly 19:00 are fine; a minute over either is flagged.
  • a-week-past-forty: 40 hours is fine; Saturday’s hour past it is flagged.
  • days-the-clocks-change: 19:00 is the wall clock’s 19:00 on the 23- and 25-hour days.
  • an-adult-has-no-limits: once minor is false, nothing is flagged, and the week counts only the days worked as a minor.

This is a common way companies implement limits on minors’ hours; check the rules where you operate. Limits differ by age, by whether school is in session and by place, and the strictest that applies is the one to set.

Get the recipe

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

minor_hours/package.toml
name = "minor_hours"
version = "1.0.0"
description = "Hours limits for minors: more than 8 hours in a workday, more than 40 in a workweek, or work between 19:00 and 07:00 raises an exception for people whose employment says they are a minor."
# Only people whose employment attribute minor is true, on the days it is.
# Each step raises an exception about the offending line; none moves time.
[[layer]]
id = "minors"
applies_to = "attributes.minor = true"
[[layer.step]]
id = "minor-daily"
uses = "standard/limit"
params = { over = "8h", kind = "minor_daily_limit" }
[[layer.step]]
id = "minor-weekly"
uses = "standard/limit"
params = { window = "week", over = "40h", kind = "minor_weekly_limit" }
[[layer.step]]
id = "minor-night"
uses = "standard/work_during"
params = { during = { daily = { from = "19:00", to = "07:00" } }, kind = "minor_late_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).

A minor may work 8 hours a day and until 19:00: Monday's exactly 8 hours, out at 16:00, and Wednesday's out at exactly 19:00 are within the limits; Tuesday's 8 hours and a minute passes the daily limit, and Thursday's out at 19:01 is late work. Each exception is about the line, shown where it starts
scenarios/a-day-at-the-limit-and-a-minute-over.toml
description = "A minor may work 8 hours a day and until 19:00: Monday's exactly 8 hours, out at 16:00, and Wednesday's out at exactly 19:00 are within the limits; Tuesday's 8 hours and a minute passes the daily limit, and Thursday's out at 19:01 is late work. Each exception is about the line, shown where it starts"
punch = [
{ at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:01", kind = "out" },
{ at = "2026-10-07 15:00", kind = "in" }, { at = "2026-10-07 19:00", kind = "out" },
{ at = "2026-10-08 15:00", kind = "in" }, { at = "2026-10-08 19:01", kind = "out" },
]
[policy]
zone = "America/Chicago"
[[employment]]
effective = "2026-06-01"
kind = "hired"
attributes = { minor = true }
[expect]
week = "2026-10-05"
exceptions = [
{ kind = "minor_daily_limit", at = "2026-10-06 08:00" },
{ kind = "minor_late_work", at = "2026-10-08 15:00" },
]
Five 8-hour days are exactly the 40 a minor may work in a week; Saturday's hour takes the week past it, an exception about Saturday's work, the week's latest
scenarios/a-week-past-forty.toml
description = "Five 8-hour days are exactly the 40 a minor may work in a week; Saturday's hour takes the week past it, an exception about Saturday's work, the week's latest"
punch = [
{ at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" },
{ at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 16:00", kind = "out" },
{ at = "2026-10-08 08:00", kind = "in" }, { at = "2026-10-08 16:00", kind = "out" },
{ at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 16:00", kind = "out" },
{ at = "2026-10-10 09:00", kind = "in" }, { at = "2026-10-10 10:00", kind = "out" },
]
[policy]
zone = "America/Chicago"
[[employment]]
effective = "2026-06-01"
kind = "hired"
attributes = { minor = true }
[expect]
week = "2026-10-05"
worked = "41h"
exceptions = [{ kind = "minor_weekly_limit", at = "2026-10-10 09:00" }]
A minor until Wednesday, when HR records that they turned 18 (minor = false): Tuesday's 9 hours pass the daily limit, but Wednesday's 10 hours to 20:00 and Thursday's long day are an adult's, with no limits, and of the week's 47 hours only Tuesday's 9 were worked as a minor, within the weekly limit
scenarios/an-adult-has-no-limits.toml
description = "A minor until Wednesday, when HR records that they turned 18 (minor = false): Tuesday's 9 hours pass the daily limit, but Wednesday's 10 hours to 20:00 and Thursday's long day are an adult's, with no limits, and of the week's 47 hours only Tuesday's 9 were worked as a minor, within the weekly limit"
punch = [
{ at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 17:00", kind = "out" },
{ at = "2026-10-07 10:00", kind = "in" }, { at = "2026-10-07 20:00", kind = "out" },
{ at = "2026-10-08 06:00", kind = "in" }, { at = "2026-10-08 22:00", kind = "out" },
{ at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 20:00", kind = "out" },
]
[policy]
zone = "America/Chicago"
[[employment]]
effective = "2026-06-01"
kind = "hired"
attributes = { minor = true }
[[employment]]
effective = "2026-10-07"
kind = "changed"
attributes = { minor = false }
[expect]
week = "2026-10-05"
worked = "47h"
exceptions = [{ kind = "minor_daily_limit", at = "2026-10-06 08:00" }]
On the days the clocks change, 19:00 is still 19:00 on the wall: on November 1, a 25-hour day, out at 19:00 is within the limit; on March 8, a 23-hour day, out at 19:01 is past it
scenarios/days-the-clocks-change.toml
description = "On the days the clocks change, 19:00 is still 19:00 on the wall: on November 1, a 25-hour day, out at 19:00 is within the limit; on March 8, a 23-hour day, out at 19:01 is past it"
punch = [
{ at = "2026-03-08 12:00", kind = "in" }, { at = "2026-03-08 19:01", kind = "out" },
{ at = "2026-11-01 12:00", kind = "in" }, { at = "2026-11-01 19:00", kind = "out" },
]
[policy]
zone = "America/Chicago"
[[employment]]
effective = "2026-01-05"
kind = "hired"
attributes = { minor = true }
[expect]
week = "2026-03-08"
exceptions = [{ kind = "minor_late_work", at = "2026-03-08 12:00" }]
[expect.period]
day = "2026-11-01"
worked = "7h"