Skip to content

Standard steps

This page lists every rule in the standard policy package that ships with Hour Advantage Time and Attendance. For each step it gives what the step does, the settings (parameters) it takes with their defaults, and an example. Use it when you set up a policy’s layers or read a recipe.

No standard step applies on its own. A layer turns a step on (uses = "standard/<step>") and gives its parameters. Later layers, for a jurisdiction, a contract or a group of people, can change those parameters (change = "params"), add a step before another, or turn one off. See policy layers. The policy cookbook has a tested recipe for every step. The scenario catalogue lists the scenarios that prove each parameter and its default.

[[layer]]
id = "overtime"
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "40h", to = "overtime", window = "week", counts = ["work"] }
  • Checked when published. Each step declares the parameters it takes: type, default, whether it is required, and which must go together. Adding a layer or publishing a policy package fails (400) when a layer gives a step any of these:

    • a parameter it doesn’t take,
    • a value of the wrong kind,
    • a combination it refuses,
    • a change to one step twice (one change would be lost).

    The error names the step, the layers that gave it and the parameter:

    step daily (standard/threshold, given by tenant rev 1, us-ca rev 2): parameter over: '8 hrs' is not a duration
  • Defaults. A step runs with every parameter you leave out set to its default.

  • Values. Durations are text ("7h 30m", "15m"). Wall times are "HH:MM". Dates are "YYYY-MM-DD". Days of the year are "MM-DD". Money is whole minor units (250 is 2.50).

  • Every step’s parameters. These are window and side.

    • window is day, week, period or 24h, for a step of the allocate or accrue stage. It can also be a repeating window of whole days, for a contract’s own cycle, such as { every = "2w", starts = "2026-01-05" }. A repeating window’s reasons name it by its length, “over 80h in the 2 weeks”.
    • side is pay, or a bill side: see pay and bill.
    • Any other window is refused when the policy is published. A set or a rolling period does not divide the days into windows.
  • Periods. Wherever a step names a year, dates, ranges of dates or hours of the day, it takes one value, a period.

  • counts. Many steps take counts. It lists the categories whose time they count. Without it they count every category that is worked.

A period is one value for a set of exact instants. The instants are written as stretches, each from a start up to a finish. One continuous year is a set of one stretch. A weekend’s nights are a set of many. Wherever a step takes a year, dates, a range of dates or hours of the day, it takes a period.

KindWrittenWhat it holds
Dates{ dates = ["2026-12-25"] }whole days, midnight to midnight in the zone in force that day
Ranges{ ranges = [{ from = "2026-10-12", to = "2026-10-16" }] }runs of whole days
Times{ times = [{ start = "2026-07-04T18:00", finish = "2026-07-05T02:00" }] }wall times
Daily{ daily = { from = "22:00", to = "06:00" } }each day’s hours, into the next day where to is at or before from
Weekdays{ weekdays = ["sat", "sun"] }whole days of those weekdays
Repeating{ every = "1y", starts = "01-01" }the occurrence holding the day asked about
The engine’s calendars"workday", "workweek", "pay_period"the one holding it, as the policy’s settings have them
Rolling{ last = "12mo" }, { next = "14d" }up to, or from, the day or instant asked about
Combined{ all = [...] }, { any = [...] }, { except = a, from = b }what all hold, what any holds, b less a
  • Lengths are a whole number and a unit. m and h are exact minutes and hours. d, w, mo and y are calendar days, weeks, months and years. Each boundary is at midnight in the zone in force on its date. A month counted from the 31st is the last day of a shorter month. A year from February 29 starts on February 28 in other years.
  • starts is one of these:
    • a date,
    • a month and day of every year ("07-01", for a length a year divides into),
    • "hire" (the person’s latest hire on or before the day asked about),
    • "leave_year" (the setting accruals.leave_year_starts).
  • Hours of the day and weekdays repeat without end. They are cut to the rest of an all they are in (the weekends of a year). Otherwise they are cut to the step’s window.
  • Each is checked when the policy is published, as every parameter is.

The weekend-night premium, for example, is one all of weekdays and hours of the day.

A step that changes time stamps the line with the rule that fired. The form is <step id> [<layers>]: <what was done>: <the rule>:

daily [tenant rev 1, us-ca rev 2]: moved 4h from work to overtime: over 8h in the day

Beside its English words, every reason carries a stable key and the values that fill it in. Your app can use them to show the reason in the person’s own language, from its own wording of each key. A step’s key is <package>/<step>.<rule>. Its values are those its words name.

  • A stamp’s action says what was done (moved with time, from and to; added_time, added_quantity, set_start, matched, earned). Its reason says the rule that fired (standard/threshold.over with over and window).
  • An exception’s reason is the rule of the step that raised it. Or it is the engine’s own kind, with the values of what it is about (context_not_allowed with dimension and value).
  • A leave request refused by a leave rule has its reason (standard/leave_balance.floor), also in leave.decided. A subject an approval rule blocked has its reason. A late change refused has its exception’s reason, with the change’s day and period.

Durations are in milliseconds. window is the window’s code: day, week, period, 24h, or a repeating window’s length such as 2w. The standard steps always name a rule. A step of your own that gives its own words has no key.

{ "step": "daily", "layers": "tenant rev 1", "did": "moved 2h from work to overtime: over 8h in the day",
"action": { "key": "moved", "values": { "time": "7200000", "from": "work", "to": "overtime" } },
"reason": { "key": "standard/threshold.over", "values": { "over": "8h", "window": "day" } } }

Every minute explained shows what else a line records and how to trace it back to the punch.

A policy’s steps run in a fixed order of stages. Within a stage, they run in the order the layers give them.

StepStageDoes
observeholidayWhere a weekend holiday is observed.
location_holidaysholidayObserves a holiday only where the person’s location lists it.
substitute_dayholidayMoves a holiday on a weekend to the next weekday no holiday takes.
substitute_day_unless_scheduledholidayMoves a weekend holiday unless the person is rostered that day.
leave_balanceleaveRefuses leave that would take the balance below a floor.
leave_balance_belowleaveRefuses leave once the balance has gone below an amount a number of times.
leave_balance_firstleaveRefuses or flags leave while paid time off is left to use first.
leave_blackoutleaveRefuses leave on days in a period.
leave_noticeleaveFlags leave asked for with short notice.
leave_routeleaveSends a stage of a long leave request to another approver.
leave_entitlementleaveRefuses or flags protected leave past an entitlement in weeks.
leave_eligibilityleaveRefuses or flags protected leave without enough service and hours.
leave_waiting_periodleaveRefuses leave in a waiting period from hire.
leave_incrementleaveRefuses leave not in whole increments.
leave_days_withinleaveRefuses leave past a number of days in a period.
leave_days_per_requestleaveRefuses a request of more days than its value allows.
lockoutpairIgnores duplicate punches.
joinpairJoins an out and an in a moment apart.
gap_lunchpairTakes an out and an in a short time apart as a lunch, whatever the clock.
directionpairGives a direction to punches that have none.
longest_shiftpairFlags, or closes, work with a forgotten clock-out.
device_allowedpairFlags a punch made on a device the person is not set up for.
matchmatchWhich scheduled shift work belongs to.
assignassignWhich assignment ambiguous work goes to.
attributeattributeWhich workday an overnight shift belongs to, or splits it.
roundtimeRounds punches, or snaps them to the shift.
gracetimeTakes punches near a shift’s start or end at it.
rate_tierateWhich of two equally close rates applies.
rate_by_hoursratePicks the rate of the rung the hours to date reached.
thresholdallocateMoves time over an amount to another category, in tiers if asked.
one_longer_dayallocateMoves each day’s time past a limit, with one longer day a week.
consecutive_dayallocateMoves the time of the Nth consecutive day worked.
after_scheduleallocateMoves time worked past the day’s schedule.
unscheduled_dayallocateMoves the time of a day with no scheduled shift.
window_premiumallocateMoves time between two wall times to another category.
window_premium_run_onallocateAs window_premium, and the work that runs on past the period.
premiumallocateMoves time on given weekdays, holidays or work to another category.
auto_mealallocateDeducts a meal from a long day with none taken.
meal_premiumallocatePays a premium for a meal not started in time.
second_meal_premiumallocatePays a premium for a second meal not started in time.
rest_break_premiumallocatePays a premium for fewer rest breaks than due.
attested_break_premiumallocatePays a premium for a break the attestation says was missed.
attested_meal_waiverallocateTakes back a meal premium for a waived meal.
minimum_payallocateTops work up to a minimum: reporting, call-back, each call-out.
minimum_engagementallocateTops an engagement up to a minimum.
split_shiftallocatePays a premium for a day split by a long gap.
split_shift_payallocatePays a split shift premium as money at the minimum rate.
split_shift_allowanceallocatePays an amount once for a day split by a long gap.
spread_of_hoursallocateMoves time worked past a spread from the day’s first work.
shortened_hourallocateAdds time for hours shorter than an hour, such as a night hour.
shortened_hour_run_onallocateAs shortened_hour, and the work that runs on past the period.
short_restallocateMoves time worked within a short rest of the last shift.
short_rest_payallocatePays an amount for a day started within a short rest.
schedule_change_payallocatePays for a shift changed with short notice.
long_breakallocateMoves or flags breaks that run long.
holiday_payallocatePays a holiday as time not worked.
holiday_attendanceallocateHolds back holiday pay when the days around it were not worked.
holiday_pay_if_present_beforeallocateHolds back holiday pay unless the person was present the workday before.
holiday_pay_from_earningsallocatePays a holiday from the earnings of the weeks before.
holiday_pay_otherwise_workingallocatePays a holiday not worked on a day the person would have worked.
holiday_average_daily_payallocatePays a holiday not worked at average daily pay.
alternative_holidayallocateAdds a day in lieu for a holiday worked.
limitallocateRaises an exception past an amount of time.
work_duringallocateRaises an exception for work in hours it may not be in.
average_limitallocateRaises an exception when weekly hours average over a limit.
monthly_average_limitallocateRaises an exception when months of time average over a limit.
weekly_restallocateRaises an exception when a week has too little rest.
piece_rateallocatePays counts at a fixed amount or a matched rate.
productivity_bonusallocatePays a bonus an hour on days at a rate of units an hour.
allowanceallocatePays an amount an hour: a differential, an allowance, standby.
earningsallocatePrices hours at the rate their work matches, with premiums.
tip_creditallocateMakes up what the cash wage and tips leave short of a minimum.
regular_rateallocatePays overtime premium on the week’s regular rate.
spread_overtime_premiumallocateSpreads the overtime premium over where the hours were worked.
spread_overtime_hoursallocateSpreads the overtime hours over where the hours were worked.
minimum_wageallocateMakes up what hours paid fall short of a minimum rate.
minimum_wage_and_overtimeallocateMakes hours up to a host country’s minimum and overtime premium.
percent_premiumallocatePays a per cent of the rate for hours in a period or on holidays.
percent_of_payallocateAdds a per cent of the period’s pay, such as rolled-up holiday pay.
rest_days_shareallocatePays a weekly rest from the window’s pay over its working days.
prevailing_wageallocateMakes hours up to a prevailing rate and pays the fringe in cash.
leave_make_up_payallocatePays leave, such as jury duty, up to scheduled pay.
leave_average_payallocatePays leave at average hourly pay.
leave_weekly_payallocatePays leave at the greater of ordinary and average weekly pay.
leave_rostered_penaltiesallocatePays leave at the greater of its loading and the roster’s penalties.
leave_waiting_daysallocateMoves the first days of a period of incapacity to another category.
comp_timeallocateMoves overtime into a compensatory time bank.
full_time_monthlyallocateReports each month’s hours of service and full-time status.
full_time_look_backallocateReports a measurement period’s average hours and full-time status.
days_presentallocateReports the days present in each country, and flags a count.
time_shareallocateFlags a share of time worked in a country.
accrueaccrueEarns time off for time worked, or by years of service.
grantaccrueGives a year’s time off at once.
carryoveraccrueForfeits a balance over a limit as the year starts.
earn_limitaccrueForfeits what is earned past a limit in a year.
carryover_payoutaccruePays out a balance over a limit as the year starts.
payout_on_leavingaccruePays out what is left of a balance on the last day employed.
payout_unused_afteraccruePays out time off not used within a period of earning it.
accrue_per_dayaccrueEarns time off for each day worked.
accrue_beyondaccrueEarns time off for what a counter earned past an amount in a year.
earned_overaccrueRaises an exception when a year’s earnings pass an amount.
time_accountaccrueEarns hours over or under a target into a time account.
balance_limitaccrueRaises an exception when a balance is over or under a limit.
lateexceptionsRaises late.
earlyexceptionsRaises left_early.
no_showexceptionsRaises no_show.
restexceptionsRaises rest_too_short.
missed_breakexceptionsRaises missed_break.
break_timeexceptionsRaises an exception for too little break time in a long day.
attestation_requiredexceptionsRaises an exception for a day with no break attestation.
flagexceptionsRaises an exception on every day worked.
late_changeslateAdjusts small changes to a closed period, refuses large or late ones.
approvalapproveWhat blocks approval, and who approves each stage.
csvexportWrites a pay period’s hours as CSV.
certified_payrollexportWrites a certified payroll for one project as CSV.
daily_recordexportWrites each day’s start and end of work as CSV.

Decides where a holiday that falls on a weekend is observed.

ParameterDefault
saturday, sundaythe holiday’s own observedWhere a holiday falling on that day goes. "friday" is the Friday before. "monday" is the Monday after. "as_is" is the day itself. "none" is not observed.
holidaysevery holidayThe holiday ids it applies to.
[[layer.step]]
id = "observe"
uses = "standard/observe"
params = { saturday = "friday", sunday = "monday" }

The cookbook’s holiday observance moves a Saturday holiday to the Friday before and a Sunday one to the Monday after.

Observes a holiday only where the person’s work location lists it. A location lists the holidays it keeps in its metadata, under key, as holiday ids. A location with no list, and a person at no location, observe every holiday. Run it after the steps that say which holidays are observed at all.

ParameterDefault
keyholidaysThe metadata key that holds the location’s list of holiday ids.
[[layer.step]]
id = "where"
uses = "standard/location_holidays"

The recipe shows a common way to keep one list of holidays. Each location’s data says which of them it keeps. Check the holiday rules where you operate. See the cookbook’s public holidays by location.

Moves a holiday observed on one of the weekdays in days. It goes to the next day that is not one of them and that no other holiday takes. Holidays are taken in the order of the days they fall on. So two holidays on one weekend take the two days after it. Run it after the steps that say which holidays are observed at all.

ParameterDefault
days["saturday", "sunday"]The weekdays a holiday is moved off. It names 1 to 6 weekdays.
holidaysevery holidayThe holiday ids it applies to.
[[layer.step]]
id = "substitute"
uses = "standard/substitute_day"

The recipe shows a common way to give a substitute weekday for a holiday that falls on a weekend. Check the holiday rules where you operate. See the cookbook’s public holidays by location.

Does what substitute_day does, with one exception. A holiday on a day the person’s roster has a shift on stays there. The substitutes are those every holiday moving would take. A holiday that stays does not free its day for another. This is the Monday observance of some countries’ holidays.

ParameterDefault
days["saturday", "sunday"]The weekdays a holiday is moved off.
holidaysevery holidayThe holiday ids it applies to.
[[layer.step]]
id = "mondayise"
uses = "standard/substitute_day_unless_scheduled"
params = { holidays = ["christmas", "boxing-day", "new-year", "day-after-new-year", "waitangi-day", "anzac-day"] }

The recipe shows a common way to move a weekend holiday for those not rostered that day. Check the holiday rules where you operate. See the cookbook’s New Zealand Holidays Act.

These steps run when a leave request is recorded. When a request breaks its rule, each step refuses the request, flags it for the approver, or routes a stage of it. A refusal carries the rule’s reason, such as standard/leave_balance.floor. The recipes for jurisdiction-specific rules show a common way to set them up. Check the rules where you operate.

Refuses a leave request that would leave the balance below floor.

ParameterDefault
balancenoneMaps each leave category to the accrual category it draws on: { sick = "sick" }. A leave category it does not list is not checked.
floor0hThe lowest the balance may go. "-40h" allows as much as 40 hours negative.
[[layer.step]]
id = "floor"
uses = "standard/leave_balance"
params = { balance = { pto = "pto" }, floor = "-40h" }

See the cookbook’s balance below once a year and accrual waiting period.

Refuses a leave request that would leave the balance below below. It does so once the balance has already gone below it times times, in the period within that holds the request’s first day.

ParameterDefault
balancenoneAs in leave_balance: each leave category and the accrual category it draws on. A leave category it does not list is not checked.
below0hThe balance the request may not go under.
times1How many times the balance may have gone under it already.
withinthe calendar yearA period: a repeating one (starts = "hire" or "leave_year" for each anniversary or leave year), or { last = "12mo" }.
[[layer.step]]
id = "below"
uses = "standard/leave_balance_below"
params = { balance = { pto = "pto" }, below = "0h", times = 1, within = { every = "1y", starts = "01-01" } }

See the cookbook’s balance below once a year.

Refuses a request in a leave category of balance while the accrual category named for it still has time left. The paid leave is used first. With flag, the request is raised as leave_balance_unused instead of refused.

ParameterDefault
balancerequiredMaps each leave category to the accrual category that is used first: { fmla = "pto" }.
flagfalsetrue: raise leave_balance_unused instead of refusing.
[[layer.step]]
id = "paid-first"
uses = "standard/leave_balance_first"
params = { balance = { fmla = "pto" } }

See the cookbook’s protected leave.

Refuses a leave request with a day in the period blackout.

ParameterDefault
blackoutrequiredA period: ranges, dates, weekdays, or any combination.
[[layer.step]]
id = "blackout"
uses = "standard/leave_blackout"
params = { blackout = { ranges = [{ from = "2026-10-12", to = "2026-10-16" }] } }

See the cookbook’s leave rules.

Flags a leave request recorded fewer than days days before its first day, as leave_short_notice. The request is flagged for the approver, not refused.

ParameterDefault
daysrequired
[[layer.step]]
id = "notice"
uses = "standard/leave_notice"
params = { days = 14 }

See the cookbook’s leave rules.

Sends a stage of the approval of a leave request to another approver when the request is of more than over. A route with no over applies to every request.

ParameterDefault
routesrequiredEach is { stage, to, over }, with stage and to required. It sends that stage to to for a request of more than over in all.
[[layer.step]]
id = "route"
uses = "standard/leave_route"
params = { routes = [{ stage = "manager", to = "role:director", over = "24h" }] }

See the cookbook’s leave rules.

Refuses a request in categories that takes the protected leave in a period past weeks of the person’s usual week. The usual week is the duration in the employment attribute week_attribute, else week. Leave is counted by the hour. With flag, the request is raised as leave_over_entitlement instead of refused.

ParameterDefault
categoriesrequiredThe leave categories counted.
weeks12The entitlement, in usual weeks.
week40hThe usual week, for a person whose attribute is not set.
week_attributenoneThe employment attribute that holds the person’s usual week.
withinthe calendar yearA period. A repeating one (each day’s) is allowed. { next = "12mo" } is 12 months from the first use, and the next 12 from the first use after. { last = "12mo" } is the 12 months up to each day used, and up to each later day the request’s time reaches.
flagfalsetrue: raise leave_over_entitlement instead of refusing.
[[layer.step]]
id = "entitlement"
uses = "standard/leave_entitlement"
params = { categories = ["fmla", "fmla_pto"], week_attribute = "usual_week" }

See the cookbook’s protected leave.

Refuses a request in categories in either of two cases. The person has less than service of employment before its first day. Or the person has less than hours earned in the accrual category worked, in within before it. With flag, the request is raised as leave_not_eligible instead of refused.

ParameterDefault
categoriesrequiredThe leave categories it applies to.
workedrequiredThe accrual category that earns an hour for each hour worked.
service12moThe length of employment needed.
service_fromfirst_hiredfirst_hired (counts earlier employment) or hired (the current hire).
hours1250hThe hours needed in within.
within{ last = "12mo" }A period: where the hours are counted.
flagfalsetrue: raise leave_not_eligible instead of refusing.
[[layer.step]]
id = "eligible"
uses = "standard/leave_eligibility"
params = { categories = ["fmla", "fmla_pto"], worked = "hours_worked" }

See the cookbook’s protected leave.

Refuses a request in categories with a day in the period wait, counted from the person’s latest hire. What the leave draws on is earned all the same during the wait.

ParameterDefault
categoriesrequiredThe leave categories it applies to.
wait{ next = "90d" }A period: the days from the hire that leave is not taken in.
[[layer.step]]
id = "waiting"
uses = "standard/leave_waiting_period"
params = { categories = ["sick"], wait = { next = "90d" } }

See the cookbook’s accrual waiting period.

Refuses a request in categories with a day whose time is not a whole number of increment, naming the day.

ParameterDefault
categories, incrementrequired
[[layer.step]]
id = "sick"
uses = "standard/leave_increment"
params = { categories = ["sick"], increment = "1h" }

"1h" takes sick leave in hour blocks. "8h" takes it in whole days of eight hours. See the cookbook’s leave increments and floating holidays.

Refuses a request in categories that would bring the days of that leave in the period within that holds a day of it past days. This request and the standing ones recorded before it are counted. A day is a day whatever its hours.

ParameterDefault
categories, daysrequiredThe leave categories counted, and the most days.
withinthe calendar yearA period.
[[layer.step]]
id = "ten-days"
uses = "standard/leave_days_within"
params = { categories = ["jury_duty"], days = 10 }

See the cookbook’s jury duty pay.

Refuses a request in categories of more days than days gives for the request’s value value, such as the relationship of a bereavement. A value not listed gets other days. With no other, a request whose value is not listed, or that names none, is refused.

ParameterDefault
categories, daysrequiredThe leave categories, and the most days for each value: { spouse = 5, parent = 3 }.
valuerelationshipThe request value the days are looked up by.
othernoneThe most days for a value not listed.
[[layer.step]]
id = "days"
uses = "standard/leave_days_per_request"
params = { categories = ["bereavement"], days = { spouse = 5, domestic_partner = 5, child = 5, parent = 3, sibling = 3, grandparent = 3, grandchild = 3 } }

The recipe shows a common way to set the days. Check the rules where you operate. See the cookbook’s bereavement leave.

These steps price approved leave as pay.

On each day of approved leave in category, such as jury duty, adds the day’s scheduled time as money in pay, in the category to. The time is priced at the rate its context matches, less the money entered that day in offset, else offset_per_day. A day with no shift uses the leave’s own time. A day that no rate matches raises kind.

ParameterDefault
category, rate, pay, torequiredThe leave category, the rate kind, the money measure and the category of the pay.
offsetnoneThe measure of money entered for the day (jury pay received) that is taken off.
offset_per_day0An amount taken off each day when offset has nothing for it.
kindno_rateThe exception raised for a day no rate matches.
[[layer.step]]
id = "make-up"
uses = "standard/leave_make_up_pay"
params = { category = "jury_duty", rate = "pay", pay = "wages", to = "jury_make_up", offset = "jury_pay" }

The recipe shows a common way to make up the difference. Check the rules where you operate. See the cookbook’s jury duty pay.

On each day of approved leave in category, such as annual leave, adds the leave’s time as money in pay, in the category to. It is paid at the average hourly pay of the weeks workweeks with pay before its week. It looks back back weeks at most. The average is the money in includes over the time counts picks in those weeks. A day with no week of pay before it raises kind. The step reads the periods before as far back as back reaches.

ParameterDefault
category, pay, torequiredThe leave category, the money measure the average is of, and the category of the pay.
weeks52How many workweeks with pay are averaged.
back104The most weeks looked back for them.
includesevery category of payThe categories whose money is averaged.
countsevery worked categoryThe categories whose time the money is divided by.
kindno_average_payThe exception raised for a day with no week of pay before it.
[[layer.step]]
id = "holiday-pay"
uses = "standard/leave_average_pay"
params = { category = "holiday", pay = "wages", to = "holiday_pay" }

The recipe shows a common way to pay leave at average earnings. Check the rules where you operate. See the cookbook’s holiday pay at average earnings.

Pays each day of leave in category, as money in pay, in to. It pays the day’s time at the greater of two amounts, over the usual week. The amounts are the ordinary weekly pay and the average weekly earnings. The ordinary weekly pay is the usual week (the employment attribute week_attribute where the person has one, else week) at rate. The average weekly earnings are the money in includes of the weeks workweeks before, over weeks. A day no rate matches raises kind.

ParameterDefault
category, pay, to, raterequiredThe leave category, the money measure, the category the pay goes to, and the rate kind.
week40hThe usual week.
week_attributenoneThe employment attribute that holds a person’s own usual week.
includesevery category of payThe categories whose money is averaged.
weeks521 to 104.
kindno_rate
[[layer.step]]
id = "annual-holiday-pay"
uses = "standard/leave_weekly_pay"
params = { category = "annual_holiday", pay = "wages", to = "annual_holiday_pay", rate = "pay", week_attribute = "ordinary_week" }

The recipe shows a common way to pay annual leave at the greater of two weekly amounts. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.

On each day of approved leave in category, it prices the day’s rostered shifts at the penalties they would have earned. The category is such as annual leave, paid at a loading per cent elsewhere. Each instant is priced at the percent of the first of penalties whose period during holds it, else 100. Where that comes to more than loading, it adds the leave’s time at the difference, at the rate its context matches, as money in pay, in to. A day with no rostered shift is paid the loading alone. A day no rate matches raises kind.

ParameterDefault
category, rate, pay, torequiredThe leave category, the rate kind, the money measure and the category of the added pay.
penaltiesrequiredEach is { during, percent }: a period and the per cent of the rate paid in it.
loading117.5The per cent the leave is paid at.
kindno_rateThe exception raised for a day no rate matches.
[[layer.step]]
id = "leave-penalties"
uses = "standard/leave_rostered_penalties"
params = { category = "annual_leave", rate = "pay", pay = "wages", to = "annual_leave_penalties", loading = 117.5, penalties = [{ during = { weekdays = ["sun"] }, percent = 150 }, { during = { weekdays = ["sat"] }, percent = 125 }] }

The recipe shows a common way to pay leave at the greater of a loading and the roster’s penalties. Check the rules where you operate. See the cookbook’s Australian retail award.

Moves the first days days of leave in categories, in each series of linked periods of incapacity, to to. A spell is days of that leave with no work, and no scheduled day that is not of the leave, between them. A spell of fewer than spell_days calendar days goes to to whole. A spell that starts within linked_within days of an earlier one’s end is linked to it, into a series. The series lasts at most longest days from its first. The spell counts the series’ waiting days. The step reads look_back days back.

With measure, the step reports each day of a period of incapacity as a count of 1 in it. Its context is the series’ first day (series) and the waiting days served by then (served). It then reads back only linked_within days and a week, and takes a series begun before from those reports.

ParameterDefault
categories, torequiredThe leave categories, and the category the waiting days go to.
days3The waiting days of a period of incapacity.
spell_days1A spell shorter than this goes to to whole.
linked_within56Days between spells that link them.
look_back365Days of earlier leave read, without measure.
longest1095The most days a series of linked periods lasts from its first. A period starting after that begins a new series.
measurenoneThe count measure each day of a period of incapacity is reported in, with its series.
[[layer.step]]
id = "waiting"
uses = "standard/leave_waiting_days"
params = { categories = ["sick"], to = "sick_waiting", days = 3, spell_days = 4, linked_within = 56 }

The recipe shows a common way to set waiting days for statutory sick pay. Check the rules where you operate. See the cookbook’s UK statutory sick pay.

Ignores a duplicate punch, such as a badge swiped twice. A duplicate is a punch within within of the punch before it, of the same kind (or where either has no direction).

ParameterDefault
within2m

Treats an out followed within within by an in as no gap. An example is stepping out for a moment. Both punches are ignored and the work runs on as one segment. Only an out and an in of the same workday are joined. The in is the next punch of that workday that is not ignored.

ParameterDefault
within5m
[[layer.step]]
id = "lockout"
uses = "standard/lockout"
params = { within = "2m" }
[[layer.step]]
id = "join"
uses = "standard/join"
params = { within = "5m" }

See the cookbook’s double punch lockout.

Takes a plain out followed within within by an in as a lunch (as = "break": a break). The out is the lunch’s start and the in its end. So the gap is a lunch segment and the work around it is one shift. The break rules count it as a break. A rule on rest between shifts does not take the work after it for a new shift. Pay is as the gap was (a lunch is not worked).

It takes every plain out and in, whatever the clock. A punch keyed as lunch at a clock with lunch keys is a lunch already. A business that wants short outs to stay outs does not list the step. A pair of the same workday, or the last out of a day and the first in of the next, are one gap. Run it after direction (it needs known ins and outs) and before join.

ParameterDefault
withinrequired
aslunch
[[layer.step]]
id = "gap-lunch"
uses = "standard/gap_lunch"
params = { within = "90m" }

See the cookbook’s a lunch from an out and an in.

Gives a direction to punches that have none, such as those from a clock with no in and out keys. Some steps ask whether a punch is an in or an out. They pass over a punch of unknown direction. Those steps are grace, and round where its punches name in or out. So a policy for such a clock runs this step first.

ParameterDefault
modegap"gap": a punch more than gap after the one before (or with none before) is an in. The rest alternate from that known start each shift. "schedule": a punch nearer a scheduled shift’s start than its end is an in, else an out. The shift is one of the punch’s workday or the next.
gap6hFor "gap".
[[layer.step]]
id = "direction"
uses = "standard/direction"
params = { mode = "schedule" }

See the cookbook’s unknown punch direction.

Raises shift_too_long for work started by an in punch whose next punch comes more than longest after it. That is a forgotten clock-out, found when the person next punches. With close, the work ends at the limit instead (an automatic clock-out). So its time counts and the next punch starts afresh. Work with no punch after it yet may still be going on. So the step says nothing about it.

ParameterDefault
longest16h
closefalse
[[layer.step]]
id = "longest-shift"
uses = "standard/longest_shift"
params = { longest = "14h", close = true }

See the cookbook’s forgotten clock-out. The longest shift also decides who is in now.

Raises kind about a punch made on a device the person’s employment attribute attribute does not list. The attribute is a list, or text separated by commas ("web, CG1"). A person without the attribute may punch on any device. The punch counts all the same.

ParameterDefault
attributedevices
kinddevice_not_allowed
[[layer.step]]
id = "devices"
uses = "standard/device_allowed"
params = { attribute = "devices", kind = "device_not_allowed" }

See the cookbook’s punching only on the devices a person is set up for. Check what the law where you operate says about tracking where people punch from.

This step decides which scheduled shift a piece of work belongs to. Work belongs to a shift if it starts between early before the shift’s start and late after it. Lunch and breaks go with the shift they fall in.

ParameterDefault
early0sHow early.
latethe shift’s endHow late.
preferfirstIf several shifts fit: "first" is the one that starts earliest. "nearest" is the one whose start is nearest the work’s start.
[[layer.step]]
id = "match"
uses = "standard/match"
params = { early = "30m", late = "2h", prefer = "nearest" }

See the cookbook’s shift matching.

This step decides which assignment gets work that several of the person’s assignments fit, when nothing says which. Work here means a segment, a labor entry or a day of leave. The work goes to the first of prefer that fits. Or it goes to the assignment that the person’s employment attribute attribute names, such as a primary assignment. When the step chooses none, the work is assignment_ambiguous. It is the same without the step.

ParameterDefault
prefernoneAssignments, in order.
attributenoneThe employment attribute naming the assignment.
[[layer.step]]
id = "assign"
uses = "standard/assign"
params = { attribute = "primary_assignment" }

See the cookbook’s primary assignment.

This step decides which workday a segment belongs to when the segment crosses a workday’s start. It decides as the law you follow says. Without this step, every segment belongs to the workday it starts in. See overnight shifts. A layer in force from a day attributes only the segments starting on the days it applies on.

ParameterDefault
modestart"start": the whole segment goes to the workday it starts in. "end": the whole segment goes to the workday it ends in. "split": the segment is cut at each workday’s start. Each piece goes to its own workday. A daily overtime law that counts by a fixed 24-hour workday does the same.
whynoneWhat the stamp says: "hours count in the workday they are worked in".
[[layer.step]]
id = "overnight"
uses = "standard/attribute"
params = { mode = "split", why = "hours count in the workday they are worked in" }

For example, a person punches in at 20:07 on Monday and out at 06:08 on Tuesday. The day starts at midnight. Rounding is 15 minutes. The daily threshold is 8 hours. The shift is 20:00 to 24:00 on Monday and 00:00 to 06:15 on Tuesday. Rounding moves the punches, never the cut. Each day’s threshold counts its own piece. See the cookbook’s overnight shifts.

This step rounds punches of the kinds in punches. It rounds to the nearest interval, or as mode says. The grid of wall times starts at the workday’s start. For example, with the day starting at 04:00, 15 minutes rounds to 04:00, 04:15 and so on.

Where a segment was split at a workday’s start there is no punch, and that edge stays.

A rounded time is not used in two cases. One is when it would put a segment’s end before its start. The other is when it would make a segment’s edge meet or cross the segment next to it. Then the segment stays as punched. So does the neighbour it would meet. Each gets an edge_not_placed exception.

The segment next to it is the one next in time. That holds whatever workday, week or pay period it is of. For example, a shift worked over the last night of a pay period is placed against the first segment of the next one. A punch arriving in the next period can put the shift back as punched. That happens in the first period’s ledger, where the exception is.

When an in or an out that ends a lunch or break is rounded, the lunch or break ends at the rounded time too. The work an in starts begins there.

A stretch with no end, such as work after an in with no out, counts as a neighbour from its start. No later segment is taken to before it starts, or into the segment before it.

The raw punch times are kept, and each change is stamped.

ParameterDefault
intervalrequiredThe step to round to: "15m".
modenearest"nearest", "up", "down", or a duration. With "7m", a time up to 7 minutes past a step rounds down. A later time rounds up.
punchesevery kindThe punch kinds rounded, from in, out and unknown: ["in", "out"].
snap_to_shiftnone{ before = "7m", after = "7m" }. Both are required. A punch that close to its shift’s start or end is taken at that start or end. It is not rounded.
[[layer.step]]
id = "rounding"
uses = "standard/round"
params = { interval = "15m", punches = ["in", "out"] }

For example, a person punches in at 07:53, has lunch from 12:02 to 12:31, and punches out at 16:22. The work is 08:00-12:02 and 12:31-16:15. The lunch punches stay as punched. The total is 7.76 hours.

Take snap_to_shift = { before = "10m", after = "15m" } and a shift from 08:00 to 16:30. Punches at 07:52 and 16:41 are taken as 08:00 and 16:30. See the cookbook’s seven-minute rounding.

This step takes an in punch as the shift’s start when it falls between in_early before and in_late after the start. It takes an out punch as the shift’s end when it falls between out_early before and out_late after the end.

It applies only to work matched to a shift. An in before the start is matched where shifts.early or a match step allows it.

The step does not use an edge it would carry past the segment’s other edge or a neighbour’s. Then the segment stays as punched. So does that neighbour. Each gets an edge_not_placed exception.

ParameterDefault
in_early, in_late, out_early, out_late0s each: off
[[layer.step]]
id = "grace"
uses = "standard/grace"
params = { in_late = "5m", out_early = "5m" }

With in_late = "5m", an in at 08:05 is taken at the 08:00 start. An in at 08:06 stays. With out_early = "5m", an out at 15:55 is taken at the 16:00 end. An out at 15:54 stays. See the cookbook’s snap to schedule.

This step decides which rate applies when two rates of a kind match the work’s context equally well. For example, one rate names its job and another names its location. When the step chooses none, the tie is rate_ambiguous and no rate applies.

A rate chosen carries the stamp of the choice. The stamp names the step, its layers and why. For example: chose rate 2 of 3 that tie: 1800 USD: the rate naming the job. The stamp is on the rate the ledger keeps. It is also on the lines and counts the rate priced.

A rate is chosen among the rates of one amount and currency. So two rates that tie in two currencies are told apart.

ParameterDefault
prefernoneDimensions, in order: ["job", "location"]. The rate naming the first of them that one does wins.
picknoneThen "highest" or "lowest" amount. Of equal amounts, the first.
[[layer.step]]
id = "rates"
uses = "standard/rate_tie"
params = { pick = "highest" }

See the cookbook’s highest rate wins.

This step chooses among rates of kind that tie. Each is a rung’s rate for the same context. The step chooses the rate of the rung that the person’s hours to date reached.

The lowest rate is for the first rung. The next higher rate is for each of rungs reached. The highest rate is for past the last rung.

The hours to date are the balance of the accrual category balance as the pay period starts. The balance is kept on the pay side. The bill side reads it too. A rung reached during a period is paid from the next period.

An accrue step that earns an hour for each hour counted keeps the balance. A hand adjustment credits hours from before.

ParameterDefault
balancerequiredThe accrual category that holds the hours to date.
rungsrequiredThe hours each rung after the first starts at: ["1000h", "2000h", "3000h"].
kindpayThe rate kind chosen among.
[[layer.step]]
id = "rung"
uses = "standard/rate_by_hours"
params = { balance = "electrician_apprentice_hours", rungs = ["1000h", "2000h", "3000h"] }

See the cookbook’s pay rate by hours worked.

This step moves time counted in the window over over to the category to. It moves the latest time first. It splits the line at the exact instant the threshold is crossed. With tiers, the highest tier moves first. Each lower tier counts what the higher one left.

ParameterDefault
over, toThe amount, and the category the time over it goes to. Required unless tiers is given. Not allowed with tiers.
tiersEach is { over, to }. They are several thresholds of one count, in any order.
windowdayday, week, period, or 24h. 24h is 24 hours from when work starts.
countsevery worked categoryThe categories counted, and moved from.
othersnonetrue: the worker’s other records (workers) count toward it too. A list of employers: only theirs. Other records count their time in the categories the step counts. These are every worked category, or those counts names. So leave or holiday pay at the other employer is not hours worked. Only this record’s time moves, never more than its own.
[[layer.step]]
id = "daily"
uses = "standard/threshold"
params = { window = "day", counts = ["work"], tiers = [{ over = "8h", to = "overtime" }, { over = "12h", to = "double_time" }] }
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { over = "40h", to = "overtime", window = "week", counts = ["work"] }

For example, take five nine-hour days with only the weekly threshold. Friday is split at 12:00. Its last five hours are overtime. They are stamped weekly [...]: moved 5h from work to overtime: over 40h in the week. With the tiers, exactly 8 hours in a day is all regular. 13 hours is 8 regular, 4 overtime and the day’s last hour double time. Tiers count exact time, not wall-clock time. On the day the clocks go back, midnight to 13:00 is 14 hours worked.

To use daily and weekly thresholds together, give the weekly one counts = ["work"]. Then time the daily one already moved to overtime is not counted again. A week starting in the pay period before counts that period’s lines. It moves only this period’s.

With others = true, 24 hours here and 30 at two other employers are 54. So 14 of this record’s hours are overtime. See the cookbook’s weekly overtime, California overtime and joint employment overtime.

This step moves each day’s time counted past over to to. It moves the latest time first. On the window’s first day with time counted past over, it moves only what is past longer. That day is the window’s one longer day. The days of the window before the pay period count toward which day that is. They are not moved.

ParameterDefault
over, longer, torequiredThe daily limit, the limit of the one longer day, and where the time past a limit goes.
countsevery worked category but to
windowweek
[[layer.step]]
id = "daily"
uses = "standard/one_longer_day"
params = { over = "9h", longer = "11h", to = "overtime", counts = ["work"] }

The recipe shows a common way to allow one longer day a week. Check the rules where you operate. See the cookbook’s Australian retail award.

This step moves the counted time of the day-th consecutive day worked in the window, and of every day after it. The time goes to to, or by tiers past each tier’s over. A run starts again with each window. Days of the run in the pay period before are counted, never moved.

ParameterDefault
day7Which day of the run, and every one after it.
to or tiersWhere the day’s time goes, or tiers of it. One of them is required.
countsevery worked categoryThe categories counted. A day whose time is all in other categories breaks the run.
windowweekperiod lets a run cross the week’s start.
[[layer.step]]
id = "seventh"
uses = "standard/consecutive_day"
params = { day = 7, counts = ["work", "overtime"], tiers = [{ over = "0s", to = "overtime" }, { over = "8h", to = "double_time" }] }

Take seven 8-hour days, Monday to Sunday. Sunday’s 8 hours are overtime. With the tiers, suppose a daily threshold made Sunday’s last 2 of 10 hours overtime. Then Sunday is 8 hours of overtime and 2 of double time. See the cookbook’s California overtime.

This step moves worked time past the day’s scheduled time to to. A day with no shift is all regular or all overtime, as unscheduled says.

ParameterDefault
toovertime
unscheduledregular
countsevery worked category
[[layer.step]]
id = "after-schedule"
uses = "standard/after_schedule"
params = { unscheduled = "overtime" }

For a shift scheduled 08:00 to 16:00, Monday’s hour past the 8 scheduled is overtime. Tuesday’s 8 are not. With unscheduled = "overtime", Saturday’s 4 hours with no shift are all overtime. See the cookbook’s overtime after schedule.

This step moves the counted time of a workday with no scheduled shift to to. Or it moves the time by tiers past each tier’s over.

ParameterDefault
to or tiersWhere the day’s time goes, or tiers of it. One of them is required.
countsevery worked category except the tiers’ ownThe categories counted.
[[layer.step]]
id = "extra-day"
uses = "standard/unscheduled_day"
params = { tiers = [{ over = "0s", to = "overtime" }, { over = "8h", to = "double_time" }] }

See the cookbook’s alternative workweek.

This step moves time counted inside a period to category. It cuts the time at the instants the period starts and finishes. Untimed lines, such as hours from labor entries, are never moved.

ParameterDefault
duringrequiredThe period: each day’s hours, the weekend’s nights, or any other period. The value { daily = { from = "22:00", to = "06:00" } } runs past midnight.
categoryrequiredWhere the time goes.
countsevery worked category
[[layer.step]]
id = "night"
uses = "standard/window_premium"
params = { during = { daily = { from = "22:00", to = "06:00" } }, category = "night" }

A shift from 20:00 to 04:00 is 20:00-22:00 work 2.00 and 22:00-04:00 night 6.00. All of it is on the workday it started. At a site in another zone, the wall times are the site’s. See the cookbook’s local time at each site and night differential.

This step does what window_premium does. It also moves time to category in one more case. The case is a stretch of work that held the whole of a stretch of during and went on past it. The time moved is the time counted from where during ends to where the work does.

A night worked whole and worked on past its end is night to the end of the work. Work that starts inside the period, or ends with it, runs nothing on.

ParameterDefault
duringrequiredThe period.
categoryrequiredWhere the time goes.
countsevery worked category
[[layer.step]]
id = "night"
uses = "standard/window_premium_run_on"
params = { during = { daily = { from = "22:00", to = "05:00" } }, counts = ["work"], category = "night" }

Work of one workday is joined where one stretch ends as the next starts. The recipe shows a common way to count work that runs on past the night. Check the rules where you operate. See the cookbook’s Brazil working hours.

This step moves a day’s counted time to category where every condition given holds. The conditions are:

  • The day is one of the weekdays listed.
  • The day observes a holiday. holidays is true, or a list of holiday ids.
  • The work’s context has the context values.

At least one condition is required. For time that meets either of two conditions, list two steps.

ParameterDefault
categoryrequired
weekdays, holidays, contextone at least
countsevery worked category
[[layer.step]]
id = "weekend"
uses = "standard/premium"
params = { weekdays = ["saturday", "sunday"], category = "weekend", counts = ["work"] }

With counts = ["work"], Saturday’s 8 regular hours go to the weekend category. Its 2 hours of overtime stay overtime. Without it, all 10 hours move. See the cookbook’s weekend premium and holiday worked premium.

This step deducts meal to to from a day worked past after with no meal taken. It deducts as if the meal was taken at into the day’s work. A punched gap of at least meal counts as the meal. So does time in meal_category.

ParameterDefault
after6h
meal30m
at5h
tomeal_deducted
meal_categorymeal
[[layer.step]]
id = "meal"
uses = "standard/auto_meal"
params = { after = "6h", meal = "30m", at = "5h" }

A day worked past 6 hours with no meal has 30 minutes moved to meal_deducted once 5 hours of work have passed. A day of exactly 6 hours keeps its time. On the night the clocks go back, the 5 hours are of work, not of wall-clock time. See the cookbook’s automatic meal deduction.

This step pays premium in category on a day worked past required_after. It pays when more than by was worked before the first meal started.

ParameterDefault
by5h
required_afterby
premium1h
categorymeal_premium
meal30m: the punched gap that is a meal
meal_categorymeal
[[layer.step]]
id = "meal-premium"
uses = "standard/meal_premium"
params = { by = "5h", premium = "1h" }

A punched 30-minute lunch starting at the end of the fifth hour pays no premium. One starting a minute later pays an hour of meal_premium. Exactly 5 hours with no meal need none. 6 hours with no meal pay an hour. See the cookbook’s meal period premium.

This step pays premium in category on a day worked past required_after. It pays when more than by was worked before its second meal. A day that has time in category already pays no second premium. That is one meal premium a day. A waiver kept in the employment attribute waiver holds on a day of no more than waived_up_to whose first meal was taken.

ParameterDefault
by10h
required_afterby
premium1h
categorymeal_premium
meal30m: the punched gap that is a meal
meal_categorymeal
waivernone: the employment attribute that holds the waiver
waived_up_to12h
[[layer.step]]
id = "second_meal"
uses = "standard/second_meal_premium"
params = { by = "10h" }

The recipe shows a common way to pay a second meal premium. Check the rules where you operate. See the cookbook’s meal period premium.

This step pays premium once in category on a day with fewer breaks than due. A break is a stretch in breaks. No break is due below from worked. After that, one is due for each every of work, or the greater part of it.

ParameterDefault
every4h
from3h30m
breaksrest_break: the break category looked at
premium1h
categoryrest_premium
[[layer.step]]
id = "rest_premium"
uses = "standard/rest_break_premium"
params = { every = "4h", from = "3h30m" }

The recipe shows a common way to pay a rest break premium. Check the rules where you operate. See the cookbook’s rest period premium.

This step tops work up to at_least in category. What it tops up depends on its basis:

  • reporting: A scheduled day reported for and worked short is paid at least at_least, or half the shift with half_of_shift, up to at_most.
  • call_back: Each stretch of work outside the shifts is paid at least at_least.
  • stretch: Each stretch of the time that counts and context pick is paid at least at_least. A call-out on call is an example.
ParameterDefault
basisrequiredreporting, call_back or stretch.
at_leastrequired
half_of_shiftfalsereporting only.
at_mostnonereporting only.
categoryminimum_pay
countsevery worked category
contextnoneOnly work of these values.
[[layer.step]]
id = "reporting"
uses = "standard/minimum_pay"
params = { basis = "reporting", half_of_shift = true, at_least = "2h", at_most = "4h", category = "reporting_pay" }

A 10-hour shift where the person is sent home after an hour pays 4 hours, not the 5 that half of it would. With basis = "call_back" and at_least = "2h", a 1-hour call-back outside the shift is topped up an hour. Staying late runs on from the shift and is no call-back. See the cookbook’s reporting time pay, call-back pay and on call.

This step pays pay once in category on a day whose work is split by a gap longer than gap. The gap is measured in elapsed time, not wall-clock time.

ParameterDefault
gap1h
pay1h
categorysplit_shift
[[layer.step]]
id = "split-shift"
uses = "standard/split_shift"
params = { gap = "1h", pay = "1h" }

Two stretches exactly an hour apart pay nothing. Two stretches an hour and a minute apart pay an hour of split_shift. Three stretches with two long gaps pay once. See the cookbook’s split shift premium.

This step tops each engagement of the day up to at_least of time counted, in category. An engagement is the day’s timed time joined across gaps of up to gap. So an unpaid meal break inside it keeps it one engagement.

ParameterDefault
at_leastrequired
gap1h
categoryminimum_engagement
countsevery worked category
[[layer.step]]
id = "minimum-engagement"
uses = "standard/minimum_engagement"
params = { at_least = "3h" }

With at_least = "3h", an engagement of 2 hours is topped up by an hour. The recipe shows a common way to give casual and part-time employees a minimum engagement. Check the rules where you operate. See the cookbook’s Australian retail award.

On a day split by a gap longer than gap, this step adds money. The amount is one hour at the day’s highest minimum rate. It is added on top of the minimum for the day’s hours. It is less what those hours are paid at rate above that minimum.

ParameterDefault
gap1h
rate, minimum, pay, categoryrequired
countsevery worked category
[[layer.step]]
id = "split_shift"
uses = "standard/split_shift_pay"
params = { gap = "1h", rate = "pay", minimum = "minimum", pay = "wages", category = "split_shift" }

The recipe shows a common way to pay a split shift premium as money. Check the rules where you operate. See the cookbook’s California split shift.

This step pays amount once, as money in pay, in category. It pays on a day whose time is split by a gap longer than gap. The gap is measured in elapsed time, not wall-clock time.

ParameterDefault
gap1h
amountrequiredWhole minor units: 480 is 4.80.
payrequiredThe money measure the amount is added to.
categoryrequired
[[layer.step]]
id = "broken-shift"
uses = "standard/split_shift_allowance"
params = { amount = 480, pay = "wages", category = "broken_shift" }

The recipe shows a common way to pay a broken shift allowance. Check the rules where you operate. See the cookbook’s Australian retail award.

This step moves to to the day’s counted time that is worked more than spread after the day’s first work started.

ParameterDefault
spread, torequired
countsevery worked category
[[layer.step]]
id = "spread"
uses = "standard/spread_of_hours"
params = { spread = "12h", to = "double_time", counts = ["work"] }

With spread = "12h", work from 06:00 to 20:00 moves the 2 hours after 18:00 to double_time. The recipe shows a common way to pay a spread of hours. Check the rules where you operate. See the cookbook’s Australian retail award.

This step adds time in category, for thresholds that count category. It works on the day’s time counted inside the period during. It adds what that time comes to in hours of hour, beyond its own length. Seven hours of night in hours of 52 minutes 30 seconds are 8 hours. So an hour is added.

ParameterDefault
duringrequiredA period: the hours that count in the shortened hour.
hourrequiredThe length of an hour inside it. More than nothing and less than 1h.
categoryrequiredWhere the added time goes.
countsevery worked category
[[layer.step]]
id = "night-hour"
uses = "standard/shortened_hour"
params = { during = { daily = { from = "22:00", to = "05:00" } }, hour = "52m30s", category = "night_hour", counts = ["work"] }

A threshold step that counts category as well as work reaches its limit sooner. The recipe shows a common way to count a night hour. Check the rules where you operate. See the cookbook’s Brazil working hours.

This step does what shortened_hour does over during. It also does it over the time a stretch of work went on past during, when that stretch of work held the whole of a stretch of during.

ParameterDefault
duringrequiredThe period: the hours that count in the shortened hour.
hourrequiredThe length of an hour inside it. More than nothing and less than 1h.
categoryrequiredWhere the added time goes.
countsevery worked category
[[layer.step]]
id = "night-hour"
uses = "standard/shortened_hour_run_on"
params = { during = { daily = { from = "22:00", to = "05:00" } }, hour = "52m30s", category = "night_hour", counts = ["work"] }

See the cookbook’s Brazil working hours.

This step moves to to the day’s counted time that is within at_least of the end of the last work of an earlier workday. The earlier workday may be in the period before.

ParameterDefault
at_least10h
torequired
countsevery worked category
[[layer.step]]
id = "rest"
uses = "standard/short_rest"
params = { at_least = "10h", to = "short_rest" }

The recipe shows a common way to set a premium for a short rest between shifts. Check the rules where you operate. See the cookbook’s predictive scheduling.

This step pays amount once, as money, for a day whose first work started within at_least of the end of the last work.

ParameterDefault
at_least10h
amount, pay, categoryrequired
countsevery worked category
[[layer.step]]
id = "rest-pay"
uses = "standard/short_rest_pay"
params = { at_least = "10h", amount = 10000, pay = "wages", category = "clopening" }

The recipe shows a common way to pay a flat amount for each short rest. Check the rules where you operate. See the cookbook’s predictive scheduling.

This step pays a day whose shifts changed after its notice began. The notice begins notice_days before the day’s date. The pay is in category. It is reduced per cent of the time taken away. Or it is changed for time added or a shift moved.

It pays nothing where every change since was the employee’s. Such a change is an override whose reason is one of employee_reasons.

ParameterDefault
notice_days14
changed1h
reduced50
categorypredictability_pay
employee_reasons["employee_request"]
[[layer.step]]
id = "changes"
uses = "standard/schedule_change_pay"
params = { notice_days = 14, changed = "1h", reduced = 50 }

The recipe shows a common way to pay for schedule changes. Check the rules where you operate. See the cookbook’s predictive scheduling.

This step moves each break longer than longest whole to to. Or it raises kind about it. Or it does both. One of to and kind is required.

ParameterDefault
longest20m
breaksrest_break: the break category looked at
to, kindone at least
[[layer.step]]
id = "long-break"
uses = "standard/long_break"
params = { longest = "20m", kind = "long_break" }

A break of exactly 20 minutes is a rest break. One of 21 minutes is long. It is raised about its line. With to = "unpaid_break", it moves there whole instead. See the cookbook’s paid rest breaks.

This step pays time in category once on a day that observes one of the holidays it pays. See schedules. A day before the person’s first hire or after their termination is not paid.

The category must be set up as not worked. Given a worked category, the step stops with an error. A holiday can’t be paid as worked time.

ParameterDefault
timerequired"8h", or "scheduled", which is the time of the day’s shifts.
categoryrequiredWhere the pay goes; must not be worked.
holidaysevery holidayThe holiday ids it pays.
contextthe day’s first shift’s valuesThe pay’s labor context.
scheduled_onlyfalsetrue: only on a day with a shift.
after_daysnoneOnly for someone employed at least that many days.
[[layer.step]]
id = "holiday-pay"
uses = "standard/holiday_pay"
params = { time = "8h", category = "holiday", after_days = 90 }

With after_days = 90, someone hired July 14 is paid Columbus Day, which is day 90. Someone hired July 15 is not, since it is day 89. See the cookbook’s holiday pay after a waiting period and holiday pay if scheduled.

This step moves a holiday’s pay to to. The pay is the lines in category. The step moves it when either of two days was not worked, not taken off and not on approved leave. The two days are the last scheduled workday before the holiday, and the first one after it within within days.

A day before the holiday that falls in the period before is read there. Pay whose day after falls in a later period goes to held. That period decides it on that day. It is paid in category, or moved to to.

ParameterDefault
category, torequiredThe category of the holiday pay, and where it goes when the rule is not met.
heldholiday_heldWhere pay waits for a day in a later period.
within7How many days either side are searched for the scheduled day (1 to 7).
windowperiod
[[layer.step]]
id = "attendance"
uses = "standard/holiday_attendance"
params = { category = "holiday", to = "holiday_forfeited" }

The recipe shows a common way to pay a holiday only when the days around it were worked. Check the rules where you operate. See the cookbook’s holiday pay if worked around.

This step moves a holiday’s pay to to. The pay is the lines in category. The step moves it when the person neither worked the holiday nor was present, or on paid leave, on the workday before it.

That day is the last one before the holiday, within within days, with a shift. A holiday not worked is passed over. A holiday worked counts as present. Time in a paid category counts as present or on paid leave. The step reads the 14 days before.

ParameterDefault
category, torequiredThe category of the holiday pay, and where it goes when the rule is not met.
within7How many days before the holiday the workday is searched for (1 to 7).
windowperiod
[[layer.step]]
id = "regular-holiday-eligibility"
uses = "standard/holiday_pay_if_present_before"
params = { category = "regular_holiday_pay", to = "regular_holiday_pay_forfeited" }

to should be set up as not paid. The recipe shows a common way to pay a holiday only after presence the day before. Check the rules where you operate. See the cookbook’s Philippines premium pay.

On a holiday the day observes, this step adds money in pay, in category. holidays is true or the ids. The money added is the money in includes of the weeks workweeks before its week, divided by divide_by. divide_by is a number of days, such as 20. Or it is days_worked, the days in those weeks with time counted. A day before the person’s first hire or after their termination is not paid.

ParameterDefault
pay, categoryrequiredThe money measure and the category the pay goes to.
includesrequiredThe categories whose money is averaged. It must not be category.
weeks41 to 52.
divide_by20A whole number of 1 or more, or days_worked.
holidaystruetrue for every holiday, or the holiday ids.
countsevery worked categoryThe time that makes a day worked, for days_worked.
[[layer.step]]
id = "public-holiday-pay"
uses = "standard/holiday_pay_from_earnings"
params = { pay = "wages", category = "public_holiday_pay", includes = ["work", "vacation_pay"] }

With divide_by = 20, 4 weeks that earned 2,000.00 pay a holiday 100.00. The recipe shows a common way to pay a public holiday from earnings. Check the rules where you operate. See the cookbook’s Canada employment standards.

This step works on a holiday the day observes (holidays) that is not worked and is an otherwise working day. It adds in category the time the person would have worked.

A day is an otherwise working day in either of two cases. A shift is scheduled on it. Or its weekday was worked in at least at_least of the weeks weeks before.

The time added is the shifts’ time. If there are none, it is the average of those weekdays worked. A day before the person’s first hire or after their termination is not paid.

The category must be set up as not worked. A worked one stops the step with an error on the first holiday it pays. The time is not worked. The overtime rules count worked categories, unless their counts names others. So they leave this time out of the week’s hours. It counts toward overtime only where a rule’s counts lists category.

ParameterDefault
categoryrequiredWhere the pay goes; must not be worked.
holidaystruetrue for every holiday, or the holiday ids.
weeks131 to 52.
at_least71 to weeks: the weeks the weekday was worked in.
countsevery worked categoryThe time that makes a day worked.
[[layer.step]]
id = "public-holiday-not-worked"
uses = "standard/holiday_pay_otherwise_working"
params = { category = "public_holiday_pay" }

The recipe shows a common way to pay a public holiday not worked. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.

On a holiday not worked that is an otherwise working day, this step adds money in pay, in category. holiday_pay_otherwise_working decides what an otherwise working day is. The money added is the money in includes of the paid_weeks workweeks before its week, divided by the number of days in them with time in days.

ParameterDefault
pay, categoryrequiredThe money measure and the category the pay goes to.
includesevery category of payThe categories whose money is averaged.
daysevery paid categoryThe categories whose time makes a day count in the divisor.
paid_weeks521 to 104.
holidaystruetrue for every holiday, or the holiday ids.
weeks131 to 52: the weeks that decide an otherwise working day.
at_least71 to weeks.
countsevery worked categoryThe time that makes a day worked.
[[layer.step]]
id = "public-holiday-average-daily-pay"
uses = "standard/holiday_average_daily_pay"
params = { pay = "wages", category = "public_holiday_pay" }

The recipe shows a common way to pay a holiday at average daily pay. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.

On a holiday the day observes that is worked and is an otherwise working day, this step adds day in category. holiday_pay_otherwise_working decides what an otherwise working day is. An accrue step banks it as a day off in lieu.

ParameterDefault
categoryrequiredWhere the day goes.
day8hThe length of the day added.
holidaystruetrue for every holiday, or the holiday ids.
weeks131 to 52.
at_least71 to weeks.
countsevery worked categoryThe time that makes a day worked.
[[layer.step]]
id = "alternative-holiday"
uses = "standard/alternative_holiday"
params = { category = "alternative_holiday_earned" }

The recipe shows a common way to give a day off in lieu for a holiday worked. Check the rules where you operate. See the cookbook’s New Zealand Holidays Act.

This step raises kind for more than over counted in the window, about its latest line or the day. Instead of over, over_from names a dotted path in the tenant’s metadata. That path holds the amount. A tenant without it has no limit.

ParameterDefault
over or over_fromone of them
kindrequired
aboutline (or day)
countsevery worked category
windowday
[[layer.step]]
id = "long-day"
uses = "standard/limit"
params = { over = "10h", kind = "long_day" }

Exactly 10 hours raise nothing. 10 hours and a minute raise long_day about the day’s latest line. See the cookbook’s long day review and minor hours.

This step raises kind about the latest line of each workday that has time inside the period during, such as a minor’s evenings and early mornings.

ParameterDefault
duringrequiredA period: { daily = { from = "19:00", to = "07:00" } }.
kindrequired
countsevery worked category
[[layer.step]]
id = "minor-night"
uses = "standard/work_during"
params = { during = { daily = { from = "19:00", to = "07:00" } }, kind = "minor_late_work" }

The recipe shows a common way to flag a minor’s hours. Check the rules where you operate. See the cookbook’s minor hours.

These steps raise an exception when working time passes a limit. They change no pay. The recipes show common ways to set the limits of a jurisdiction. Check the rules where you operate.

For each workweek ending in the window, this step raises kind about its latest line. It does so when the time counted in the weeks workweeks with any ending with it averages more than over a week.

A week with no time counted is passed over, not counted as nothing. A fixed reference period is a limit on a repeating window of its length. The step reads the periods before as far back as weeks reaches.

ParameterDefault
over, weeks, kindrequired
countsevery worked category
othersnone
windowperiod

With others, the worker’s other records’ time counts toward each week too. Use true for every one. Use a list of employers for only theirs. The time counts in the categories the step counts. These are every worked category, or those counts names. Each record flags its own weeks, about its own latest line. Its pay does not change. The other records are read as far back as weeks reaches.

[[layer.step]]
id = "average"
uses = "standard/average_limit"
params = { over = "48h", weeks = 24, kind = "average_over_8h_a_day" }

See the cookbook’s Germany working hours, Netherlands working hours and working time directive.

At the end of each calendar month, this step raises kind about the month. It does so where the time counted in the last from to months months averages more than over a month. This holds for any span ending with that month. The months before are read as far back as months reaches.

ParameterDefault
over, kindrequired
from2The shortest span of months averaged, 1 or more.
months6The longest span, from from to 12.
countsevery worked category
windowcalendar month{ every = "1mo", starts = "01-01" }. starts may name another month’s first day, such as "04-01". Nothing else is accepted.
[[layer.step]]
id = "average-over-80h"
uses = "standard/monthly_average_limit"
params = { over = "80h", kind = "overtime_and_holiday_average_over_80h", counts = ["overtime", "overtime_over_60h", "overtime_night", "overtime_over_60h_night", "holiday", "holiday_night"] }

The recipe shows a common way to flag a monthly average of overtime. Check the rules where you operate. See the cookbook’s Japan overtime premiums.

This step raises kind about the window’s latest line when its stretches with no time counted, each at least shortest long, come to less than at_least. Time that has not come yet counts as rest.

ParameterDefault
at_leastrequired
shortestat_least
kindweekly_rest_short
countsevery worked category
windowweek
[[layer.step]]
id = "weekly-rest"
uses = "standard/weekly_rest"
params = { at_least = "36h" }

See the cookbook’s Netherlands working hours and working time directive.

This step raises kind about a day whose work comes to more than a tier’s after, with less than that tier’s at_least of breaks between its work segments. The highest tier the day passed decides. A break counts from shortest.

ParameterDefault
tiersrequiredEach { after, at_least }.
shortest0sThe shortest gap that counts as a break.
kindbreak_short
[[layer.step]]
id = "breaks"
uses = "standard/break_time"
params = { tiers = [{ after = "6h", at_least = "30m" }, { after = "9h", at_least = "45m" }], shortest = "15m" }

See the cookbook’s Germany working hours, Netherlands working hours and working time directive.

An employee can attest to how a day’s breaks went. These steps read the break attestation of a day. The recipe shows a common way to use them. Check the rules where you operate.

Raises kind about a day that has no attestation of its breaks. The day must have more than after of work, and all of that work must have ended.

ParameterDefault
after0s
kindattestation_missing
[[layer.step]]
id = "attested"
uses = "standard/attestation_required"

See the cookbook’s break attestation.

Pays premium in category on a day whose attestation says a break (meal or rest) was missed, cut short or taken late. It does this even where the punches show the break taken. A day that already has time in category pays no second premium.

Run it after the step that pays the premium from the punches, meal_premium or rest_break_premium. A break waived of the person’s own choice owes nothing here.

ParameterDefault
breakrequired"meal" or "rest".
categoryrequiredWhere the premium is paid.
premium1h
[[layer.step]]
id = "attested_meal"
uses = "standard/attested_break_premium"
params = { break = "meal", category = "meal_premium" }

See the cookbook’s break attestation.

Moves what the step premium_step paid that day to to. This applies on a day worked no more than up_to, whose attestation says meal meal was waived of the person’s own choice. Run it after that step. A policy that allows no waiver leaves it out.

ParameterDefault
premium_step, up_to, torequiredpremium_step is the step whose premium is taken back. up_to is the longest day the waiver holds for. to is the category the time goes to (not paid).
meal1Which of the day’s meals: 1 is the first.
[[layer.step]]
id = "meal_waiver"
uses = "standard/attested_meal_waiver"
params = { premium_step = "meal_premium", up_to = "6h", to = "meal_premium_waived" }

See the cookbook’s break attestation.

Pays each count of measure either each minor units, or the amount of the rate kind that matches the count’s context. A minor unit is the smallest unit of money, such as a cent: 250 is 2.50. The pay is money in the measure pay, in category, with the count’s context.

A count with no rate matching it pays nothing. A count whose rates tie raises rate_ambiguous and pays nothing until the tie is settled.

ParameterDefault
measurerequiredThe count measure: "boxes".
each or rateone of themA fixed amount per unit, in minor units; or a rate kind (rates).
pay, categoryrequiredThe money measure and the category of the pay.
[[layer.step]]
id = "pieces"
uses = "standard/piece_rate"
params = { measure = "boxes", each = 25, pay = "pay", category = "piece_pay" }

Ten boxes pay this line, beside the count: 2026-10-05 pay 2.50 USD piece_pay job=pack. See the cookbook’s piece rate.

Pays per_hour minor units for each hour worked on a day with at least at_least units of measure an hour. The pay is money in the measure pay, in category. The rate is compared on exact time worked, never rounded hours.

ParameterDefault
measure, at_least, per_hour, pay, categoryrequired
countsevery worked category: the time worked
[[layer.step]]
id = "bonus"
uses = "standard/productivity_bonus"
params = { measure = "boxes", at_least = 12, per_hour = 150, pay = "pay", category = "bonus" }

96 boxes in 8 hours earn 12.00. 95 boxes the next day earn nothing. See the cookbook’s productivity bonus.

Pays an amount an hour, as money in the measure pay, in category. The amount is worked out once for the window, for each rate. It is added on the window’s last day worked, so it is never rounded hour by hour.

ParameterDefault
pay, categoryrequired
per_hourAn amount in minor units, or a table of amounts by the context value by: { evening = 100, night = 150 }.
byThe context value per_hour’s table is keyed by.
per_hour_from{ hierarchy, key }: the amount in the metadata of the person’s organization of that hierarchy that day, or of the nearest one above it that has it.
basisworkedworked time, or scheduled: the time of the scheduled shifts with shift_values, worked or not.
shift_valuesnoneFor scheduled: the shifts’ values.
contextnoneOnly work of these values.
countsevery worked category
windowperiod
[[layer.step]]
id = "differential"
uses = "standard/allowance"
params = { by = "shift", per_hour = { evening = 100, night = 150 }, pay = "differential", category = "shift_differential" }

An evening shift earns 1.00 an hour, and a night shift 1.50. A day shift with no amount earns nothing. Every worked category counts, so an overtime hour on nights earns it too. A paid lunch set up as not worked earns none.

See the cookbook’s shift differential, site allowance and on call.

Prices the window’s hours as money in measure. Each line is priced at the rate of kind rate that its context matches. That is multiplied by its category’s premium in per cent.

Earnings are worked out once for the window. They are added, for each category, context and rate, on the latest workday of the window that has such a line. They carry the work’s context. The days before it show the hours and no money in their ledgers. The window’s money is the sum of its days.

A category that premiums doesn’t name earns nothing. A line that no rate matches earns nothing and raises kind. So the missing rate is asked for instead of guessed.

ParameterDefault
rate, measure, premiumsrequired
kindno_rate
windowperiod
[[layer.step]]
id = "wages"
uses = "standard/earnings"
params = { rate = "pay", measure = "wages", premiums = { work = 100, overtime = 150 } }

40 hours of work at 20.00 are 800.00. 5 hours of overtime at 150 per cent are 150.00. A premium takes hundredths of a per cent: 117.5 pays an annual leave loading of 17.5 per cent. See the cookbook’s staffing agency.

Makes up the difference between what the window’s hours must pay at minimum and what the cash_wage and reported tips pay. The difference is paid as money in pay, in category, on the last day worked.

ParameterDefault
tips, cash_wage, minimum, pay, categoryrequired
countsevery worked category
windowweek
[[layer.step]]
id = "tip-credit"
uses = "standard/tip_credit"
params = { tips = "tips", cash_wage = 213, minimum = 725, pay = "pay", category = "tip_makeup" }

A server paid 2.13 an hour works 44 hours and reports 150.00 in tips. At 7.25, the week must pay 319.00. The cash wage pays 93.72 and the tips 150.00. So 75.28 is made up. See the cookbook’s tips.

These steps work out a rate or an amount from the hours and money of a window. Steps that make up pay to a legal minimum, a regular rate or a supplement show a common way in their recipes. Check the rules where you operate. Send what the ledger holds to payroll, which pays.

Works out the window’s regular rate. It pays each category in premiums its per cent of that rate. Overtime at 50 pays the half on top of straight time.

The rate is built in three parts:

  • Each hour worked (hours) is priced at the rate its context matches.
  • The money in the includes categories is added.
  • The total is divided by the hours worked.

The window’s days before the pay period count. Their premium time was paid in the period before. It is made up to the week’s rate, and not taken back. An hour that no rate matches raises kind.

ParameterDefault
measure, premiumsrequiredThe money measure, and each category’s per cent: { overtime = 50 }.
rate or includesone at leastThe rate kind each hour is priced at, and the categories whose money is added to the pay.
hoursevery worked categoryThe categories whose hours are counted.
kindno_rateThe exception raised for an hour no rate matches.
windowweek
[[layer.step]]
id = "overtime-premium"
uses = "standard/regular_rate"
params = { rate = "pay", measure = "wages", premiums = { overtime = 50 } }

See the cookbook’s regular rate overtime, fluctuating workweek, overtime cost spread and staffing agency.

Spreads the money that the steps in steps added, the overtime premium, over the values of the labor context dimension by. The spread is in proportion to the hours worked at each value. The dimension can be a location, a cost center, an assignment, or an organization level the setup implies from one.

The days of the window before the pay period count.

The parts add up to the money exactly. Each value takes the whole minor units of the running total not yet given. What is left below a unit carries forward to the next. Each part names its value. Hours with no value take their share with no value.

The hours and their straight time stay where they were worked, and the pay is the same. Run it after the steps it names.

ParameterDefault
by, stepsrequired
countsevery worked category
windowweek
[[layer.step]]
id = "spread"
uses = "standard/spread_overtime_premium"
params = { by = "location", steps = ["overtime-premium"] }

See the cookbook’s overtime cost spread.

Puts the window’s own time in each of categories at the values of by, in proportion to the hours worked at each. The money in those categories goes with it, straight time and premium alike.

It shares the money out as spread_overtime_premium does. A value over its share gives its latest time in the category to the values short of theirs. Only the line’s by changes. The hours by category and the money are the same. The hours at each value are not.

Run it after the steps that pay the hours. Hours priced after it are priced as the value they were put at.

ParameterDefault
byrequired
categories["overtime", "double_time"]
countsevery worked category
windowweek
[[layer.step]]
id = "spread"
uses = "standard/spread_overtime_hours"
params = { by = "location" }

See the cookbook’s overtime cost spread.

Adds what the window’s hours are paid short of the minimum rate that each matches. The hours are paid at rate. It is worked out for the hours of each minimum. Pay above one minimum makes up none of another.

The money in the includes categories is taken off the shortfall. An example is tips where a tip credit is allowed.

A week split by a pay date is checked whole, less what the earlier period made up. What was made up is not taken back.

ParameterDefault
rate, minimum, pay, categoryrequired
includes, countsnone; every worked category
windowweek
[[layer.step]]
id = "minimum"
uses = "standard/minimum_wage"
params = { rate = "pay", minimum = "minimum", pay = "wages", category = "minimum_wage_makeup" }

The recipes show a common way to set minimum wages by location. Check the rules where you operate. See the cookbook’s minimum wage by location and UK minimum wage.

Adds what the window’s hours are paid short of what a minimum rate owes them. This covers hours whose context matches that rate. The rate is a host country’s.

The hours are paid at rate times their category’s per cent in premiums. They are owed the minimum for every hour. They are also owed each of tiers’ per cent of it, for the hours of that minimum past the tier’s over. That is the host’s overtime premium.

The hours of each minimum are worked out together. Pay above one makes up none of another’s. An hour that no minimum matches is owed nothing.

The shortfall is added with the minimum’s last line’s context, on the window’s last own day worked. A week split by a pay date is compared whole, as minimum_wage checks it.

ParameterDefault
rate, premiums, minimum, pay, categoryrequiredThe rate the hours are paid at, each category’s per cent of it, the minimum rate kind, the money measure and the category of the added pay.
tiersrequiredEach { over, percent }: past over hours of a minimum, that per cent of it.
countsevery worked category
windowweekweek or day.
[[layer.step]]
id = "host-minimum"
uses = "standard/minimum_wage_and_overtime"
params = { rate = "pay", premiums = { work = 100, overtime = 150 }, minimum = "minimum", tiers = [{ over = "35h", percent = 125 }, { over = "43h", percent = 150 }], pay = "wages", category = "posting_makeup" }

The recipe shows a common way to make a posted worker’s pay up to a host country’s rates. Check the rules where you operate. See the cookbook’s posted workers.

Pays percent per cent, to the hundredth, of the rate each line’s context matches. It pays this for the line’s time counted inside the period during and on the days holidays says. The pay is money in pay, in category.

It moves no time, so such premiums add up. Like earnings, the money is worked out once for the window and added on the latest workday of it with such time.

ParameterDefault
rate, percent, pay, categoryrequiredThe rate kind, the per cent, the money measure and the category of the pay.
during, holidaysone at leastA period. For holidays: true (a holiday), a list of holiday ids, or false (none).
countsevery worked category
windowperiod
[[layer.step]]
id = "night"
uses = "standard/percent_premium"
params = { rate = "pay", percent = 25, pay = "wages", category = "night_supplement", during = { daily = { from = "20:00", to = "06:00" } } }

The recipe shows a common way to pay night, Sunday and holiday supplements. Check the rules where you operate. See the cookbook’s Germany supplements.

Adds percent per cent, to the hundredth, of the window’s money of pay in the includes categories. It is added in category, on the window’s last day with such money. It fits holiday pay rolled up into each period’s pay, or vacation pay as a per cent of earnings.

ParameterDefault
pay, includes, percent, categoryrequired
windowperiod
[[layer.step]]
id = "holiday-pay"
uses = "standard/percent_of_pay"
params = { pay = "wages", includes = ["work", "overtime"], percent = 12.07, category = "rolled_up_holiday" }

The recipe shows a common way to roll holiday pay up. Check the rules where you operate. See the cookbook’s rolled up holiday pay.

On the window’s last day, adds money in pay, in category. The amount is the window’s money in includes, divided by its working days, times its rest days. The rest days are the days rest holds and those that observe a holiday. It pays a weekly rest on hourly pay and overtime.

ParameterDefault
pay, categoryrequiredThe money measure and the category the pay goes to.
includesrequiredThe categories whose money is shared.
rest{ weekdays = ["sun"] }A period: the rest days.
windowperiod
[[layer.step]]
id = "paid-rest"
uses = "standard/rest_days_share"
params = { pay = "wages", category = "paid_rest", includes = ["work", "overtime", "overtime_100", "night", "night_hour", "overtime_night", "overtime_100_night"] }

The recipe shows a common way to pay a weekly rest. Check the rules where you operate. See the cookbook’s Brazil working hours.

These two work together on covered projects. The recipes show a common way to price the hours and write the form. Check the rules where you operate.

This step applies to hours whose context matches a base rate. The base rate is a covered project’s classification. It makes those hours up to that rate times their category’s per cent in premiums, against the rate they are paid at. Each hour is on its own. The make-up is in category.

It also pays the fringe for every hour, not multiplied. The benefits and the pay rate above the base are taken off. The result is paid as cash in fringe_category.

Each is by the work’s context, on the window’s last own day with such hours.

ParameterDefault
base, rate, premiums, pay, categoryrequired
fringe, fringe_categorygo together
benefitsnone
windowweek
[[layer.step]]
id = "prevailing"
uses = "standard/prevailing_wage"
params = { base = "prevailing_base", fringe = "prevailing_fringe", benefits = "benefits", rate = "pay", premiums = { work = 100, overtime = 150 }, pay = "wages", category = "prevailing_makeup", fringe_category = "fringe_cash" }

See the cookbook’s prevailing wage.

This is an exporter (payroll export), not a step of a layer. It writes a certified payroll of one project, as CSV. The content is that of form WH-347. There is a row for each person, week of the period, classification and rate of pay.

Each row has the straight and overtime hours of each of the week’s days. It also has the rates of pay, and the gross.

The rates are these:

  • The pay rate raised to the base.
  • Overtime at overtime_premium per cent.
  • The fringe left by the benefits.
  • The pay above the base paid as cash.

prevailing_wage pays them in the same way. The deductions and net wages are left to payroll.

ParameterDefault
projectrequiredThe project the file is for.
project_keyprojectThe labor context key that names the project.
classification_keyclassificationThe labor context key that names the classification.
straight["work"]The categories written as straight hours.
overtime["overtime"]The categories written as overtime hours.
ratepayThe rate kind of the pay rate.
basenone: the pay rate as it isThe rate kind the pay rate is raised to, as prevailing_wage has it.
fringenone: no fringe paid as cashThe rate kind of the fringe.
benefitsnone: nothing taken off the fringeThe money measure of the benefits paid, as prevailing_wage has it.
overtime_premium150The per cent of the rate overtime is paid at.
id_attributethe person’s own idThe employment detail that holds the person’s id.
name_attributenone: the name column is emptyThe employment detail that holds the person’s name.
uses = "standard/certified_payroll"
params = { project = "bridge-12", id_attribute = "payroll_id", name_attribute = "name", rate = "pay", base = "prevailing_base", fringe = "prevailing_fringe", benefits = "benefits" }

See the cookbook’s certified payroll.

Earns earn of the accrual category for every per of time counted. The earning is in proportion. It never goes past a balance of cap. With tiers, each day earns at the tier of the person’s whole years of service that day. See accruals.

ParameterDefault
categoryrequiredThe accrual category.
earn, per"1h" for every "30h": 15 hours earn 30 minutes. Or tiers.
tiersEach { years, earn, per }.
service_fromhiredhired (the current hire) or first_hired.
capnoneThe most the balance may reach.
countsevery worked category
windowperiod
[[layer.step]]
id = "pto"
uses = "standard/accrue"
params = { category = "pto", earn = "1h", per = "30h", counts = ["work"], cap = "2h" }

Forty hours a week earn 1h 20m. The second week would earn another 1h 20m, but the cap leaves room for 40 minutes. See the cookbook’s sick leave one per thirty and vacation by service.

Gives the year’s amount of category on the first day of each year. It gives it all at once, to everyone employed that day.

A person hired during the year is treated as new_hires says. With new_hires = "by_month", the person gets the share of the months left, on the hire date. With "none", the person gets nothing until the next grant.

ParameterDefault
category, amountrequired
year{ every = "1y", starts = "01-01" }; starts = "hire" grants on each anniversary
new_hiresby_month
[[layer.step]]
id = "grant"
uses = "standard/grant"
params = { category = "pto", amount = "80h" }

A person hired July 2 gets six months of 80 hours: 40 hours. See the cookbook’s annual grant.

Forfeits the balance above limit as a year starts. It counts what the steps before it earned on the days before. In a pay period that crosses the year’s start, run it after the steps that earn by the day.

ParameterDefault
category, limitrequired
year{ every = "1y", starts = "01-01" }
[[layer.step]]
id = "carryover"
uses = "standard/carryover"
params = { category = "sick", limit = "40h" }

50 hours of sick leave brought into January, with a limit of 40, lose 10 hours on January 1. See the cookbook’s sick leave carryover.

Forfeits what the accrue steps earned of category in a year past limit. This happens as the time is earned.

ParameterDefault
category, limitrequired
yearthe calendar year
[[layer.step]]
id = "yearly"
uses = "standard/earn_limit"
params = { category = "sick", limit = "40h" }

See the cookbook’s earning capped each year.

Pays out the balance above limit as a year starts. It is paid out as time in pay. limit = "0h" pays out all of it.

ParameterDefault
category, limit, payrequired
yearthe calendar year
[[layer.step]]
id = "vacation"
uses = "standard/carryover_payout"
params = { category = "vacation", limit = "40h", pay = "vacation_payout" }

See the cookbook’s year end by category.

On the person’s last day employed, pays out what is left of category as time in pay.

ParameterDefault
category, payrequired
[[layer.step]]
id = "leaving"
uses = "standard/payout_on_leaving"
params = { category = "comp", pay = "comp_payout" }

See the cookbook’s comp time.

On the window’s last day, pays out the balance of category that was not earned within the period within up to that day. It is paid out as time in pay. It pays out time not used in time. The oldest is used first. A hand adjustment counts as earned before.

ParameterDefault
category, payrequiredThe accrual category, and the category the time is paid out to.
within{ last = "6mo" }A period ending on the window’s last day.
[[layer.step]]
id = "toil-not-taken"
uses = "standard/payout_unused_after"
params = { category = "toil", pay = "toil_payout", within = { last = "6mo" } }

The recipe shows a common way to pay out time off in lieu not taken within six months. Check the rules where you operate. See the cookbook’s Australian retail award.

Earns earn of category for each day of the window with time counted. That is, days worked, counted.

ParameterDefault
categoryrequired
earn1h
countsevery worked category
windowperiod
[[layer.step]]
id = "days"
uses = "standard/accrue_per_day"
params = { category = "days_worked" }

See the cookbook’s France forfait jours.

Earns earn of category for every per of what the accrual category counter earned in year past after. This happens as the counter is earned. Run it after the steps that earn the counter.

ParameterDefault
category, counter, afterrequired
earn1h
per1h
yearthe calendar year
[[layer.step]]
id = "rest"
uses = "standard/accrue_beyond"
params = { category = "compensatory_rest", counter = "overtime_hours", after = "220h" }

The recipe shows a common way to earn rest for overtime past a yearly quota. Check the rules where you operate. See the cookbook’s France overtime quota.

Raises kind about a window. In that window, what category earned in year goes past over, or stays past it, while it earns more.

ParameterDefault
category, over, kindrequired
yearthe calendar year
[[layer.step]]
id = "quota"
uses = "standard/earned_over"
params = { category = "overtime_hours", over = "220h", kind = "overtime_quota_passed" }

See the cookbook’s France overtime quota and France forfait jours.

Moves the pay period’s overtime in categories to to. The category to is worked and not paid. The move goes as far as the accrual category bank has room under cap, at earn for every per. The rest stays overtime, and is paid.

The room is the balance as the period opens, with its hand adjustments and the time used in it. An accrue step earns the bank from to. This step runs in the allocate stage.

ParameterDefault
to, bank, caprequired
categories["overtime"]
earn1h30m
per1h
[[layer.step]]
id = "bank"
uses = "standard/comp_time"
params = { to = "comp_earned", bank = "comp", earn = "1h30m", per = "1h", cap = "240h" }

The recipe shows a common way to bank compensatory time in place of paid overtime. Check the rules where you operate. See the cookbook’s comp time.

Earns into category each window’s time counted less the target. The result can be more or less than nothing. Hours over the target add to the balance. Hours under it take from it.

The target is the window’s scheduled time (target = "scheduled", which ignores target_attribute). Or it is a duration for a whole window. That duration is the one in the employment attribute target_attribute where the person has one, else target.

The attribute’s value is text such as 37h 30m, or a number of hours such as 37.5. Any other value fails the person’s ledger, naming the attribute and the day.

A duration is shared by the days of the window on which the person is employed and the step applies.

ParameterDefault
category, targetrequiredThe accrual category, and the target.
target_attributenoneThe employment attribute that holds a person’s own target.
countsevery paid category: hours worked and paid leave
windowweek
[[layer.step]]
id = "account"
uses = "standard/time_account"
params = { category = "time_account", target = "40h", target_attribute = "weekly_hours" }

See the cookbook’s working time account.

Raises kind about the window when the balance of category, as the next day starts, is above above or below below. A balance_limit step after time_account flags a balance beyond its limits.

ParameterDefault
categoryrequired
above, belowone at least
kindbalance_limit
windowweek
[[layer.step]]
id = "limits"
uses = "standard/balance_limit"
params = { category = "time_account", above = "40h", below = "-20h", kind = "time_account_limit" }

See the cookbook’s working time account.

These steps report a person’s hours of service over a measurement window, and whether they were full time. A status is a fact for an export or an app to read. It is not a decision on benefits.

The quantity’s context names the days measured (measured_from, measured_to). It also names the days the status holds for (holds_from, holds_to).

Each step runs only in the pay period that holds its window’s last day. It reads the earlier periods of a long window from the ledger. Run them after the steps that add paid time, such as holiday pay. The recipe shows a common way to measure each method. Check the rules where you operate.

Reports each calendar month the person was employed in, on its last day. The report is a quantity of the duration measure measure: its hours of service. The quantity is in the category full_time where the hours are per_month or more, else not_full_time. The status holds for that month.

ParameterDefault
measurerequiredThe duration measure the hours are reported in.
per_month130hThe hours of a month that make it full time.
countsevery paid category: hours worked and paid leave
full_timefull_timeThe category reported for a full-time month.
not_full_timenot_full_timeThe category reported otherwise.
windowthe calendar month
[[layer.step]]
id = "monthly"
uses = "standard/full_time_monthly"
params = { measure = "hours_of_service" }

See the cookbook’s full-time status measurement.

Reports the measurement period window, of 3 to 12 months, on its last day, as full_time_monthly does. The person is full time where the hours of service average per_month or more a month. The status holds for stability, starting administrative days after the period ends.

A window from hire is the initial measurement period of a person hired. Only the first is measured. A window from a date measures people employed from its first day.

ParameterDefault
measure, window, stabilityrequiredThe measure, the measurement period, and how long the status holds.
administrative0dDays between the end of the period and the start of the status, up to 90d.
per_month130hThe average hours a month that make a person full time.
countsevery paid category
full_time, not_full_timefull_time, not_full_timeThe status names reported.
[[layer.step]]
id = "standard-measurement"
uses = "standard/full_time_look_back"
params = { measure = "hours_of_service", window = { every = "12mo", starts = "10-15" }, administrative = "78d", stability = "12mo" }

For the initial measurement period of a person hired, the same recipe uses window = { every = "12mo", starts = "hire" }. See the cookbook’s full-time status measurement.

Reports each day of the window as a day present. A day present is a count of 1 in measure, in category. It carries the value as its context. It is reported in each value of the dimension by (a country) that any part of the day has.

A day has a value by its lines (those counts picks). With located, it also has values by the day’s work location. With residence, it has the value of that employment attribute on each day employed. value counts one value alone.

With days, it raises kind about that day’s latest line of that value. It does so on the day a value’s days in the period within come to that number. The period within is a tax year, a year at most.

The step takes measure, days or both. Where it raises, it reads back a year and a day.

ParameterDefault
byrequiredThe dimension whose values are the countries.
measurenoneThe count measure the days are reported in.
categorypresentThe category of the reported days.
countsevery worked category
locatedfalseCount the values of the day’s work location too.
residencenoneThe employment attribute naming where the person lives. Its value counts on each day employed.
valuenoneCount one value of by alone.
daysnoneRaise kind on the day a value’s days come to this many.
withinthe calendar yearThe span counted for days, a year at most: { every = "1y", starts = "04-06" }.
kinddays_presentThe exception raised.
windowperiod
[[layer.step]]
id = "count"
uses = "standard/days_present"
params = { by = "country", measure = "days_present", located = true }
[[layer.step]]
id = "uk-near-183"
uses = "standard/days_present"
params = { by = "country", value = "gb", located = true, within = { every = "1y", starts = "04-06" }, days = 150, kind = "near_183_days_gb" }

Days present are facts for payroll, tax and social security systems to read. Time and Attendance decides no tax and no social security. See the cookbook’s days present by country and frontier workers.

Raises kind about the window where a value of the dimension by (a country) has a share of the time counted (counts) of percent or more. The share is measured in the period within, up to the window’s last day. The value must have had less up to the day before the window’s first. This also holds the other way round. The exception says the share.

With value_attribute, only the value of that employment attribute (where the person lives) is looked at. Time with no value counts toward the whole only. The step reads back a year and a day.

ParameterDefault
by, kindrequiredThe dimension whose values are the countries, and the exception raised.
percent25The share flagged.
value_attributenoneThe employment attribute naming the one value looked at.
within{ last = "12mo" }The span counted, a year at most.
countsevery worked category
windowperiod
[[layer.step]]
id = "home-share"
uses = "standard/time_share"
params = { by = "country", value_attribute = "residence", percent = 25, kind = "residence_share_25" }

The exception is raised once, when the share crosses percent. It is a fact for someone to review, not a decision. See the cookbook’s habitual work share.

Raises kind when a shift’s first work starts with an in punch more than grace after the shift’s start. With points, the exception’s detail carries the points.

Work after a lunch punched out and back in is not the shift’s first. It is never late. Work with no shift is never late.

ParameterDefault
grace0s
kindlate
pointsnone

Raises kind when a shift’s last work ends more than grace before the shift’s end. An out to lunch and back in is no departure.

ParameterDefault
grace0s
kindleft_early
pointsnone
[[layer.step]]
id = "late"
uses = "standard/late"
params = { grace = "5m", kind = "attendance_point", points = 0.5 }
[[layer.step]]
id = "early"
uses = "standard/early"
params = { grace = "5m", kind = "attendance_point", points = 0.5 }

With five minutes’ grace, an out at 15:55 for a 16:00 end is on time. One at 15:54 left early. See the cookbook’s late and early and attendance points.

Raises kind about a day with a scheduled shift and no work, unless one of these holds:

  • An override took the day off.
  • The day has approved leave.
  • With holidays_off, the day is a holiday.

Leave still waiting for approval, or rejected, excuses nothing.

ParameterDefault
holidays_offtrue
kindno_show
pointsnone
[[layer.step]]
id = "no-show"
uses = "standard/no_show"

Say a person is scheduled Monday to Wednesday, works Monday, and is on approved leave Tuesday. Wednesday is a no_show, at the start of the day. See the cookbook’s no show.

Raises rest_too_short when the first work of a workday starts less than at_least after the last work of an earlier workday ended. The earlier workday can be in the previous pay period.

Work that runs on across a workday’s start is not a new start. It is the second piece of a split segment. Rest is counted from its end.

ParameterDefault
at_leastrequired
[[layer.step]]
id = "rest"
uses = "standard/rest"
params = { at_least = "10h" }

Say a person is out at 23:00 on Monday and in at 08:09 on Tuesday, for a shift at 08:00. A late step has grace = "5m". Tuesday’s work is both late and rest_too_short. See the cookbook’s rest between shifts.

Raises kind about a day with fewer breaks than one for each every of work.

ParameterDefault
every4h
kindmissed_break
[[layer.step]]
id = "breaks"
uses = "standard/missed_break"
params = { every = "4h" }

8 hours straight call for one break. With none, kind is raised. Exactly 4 hours call for none. See the cookbook’s missed break.

Raises kind, with detail, about each workday with work. With an eligibility rule on its layer, it flags the days of the people the rule picks.

ParameterDefault
kindrequired
detailnone
[[layer]]
id = "unlinked"
applies_to = "unlinked = true"
[[layer.step]]
id = "who-is-this"
uses = "standard/flag"
params = { kind = "who_is_this", detail = "link them to the employee they are" }

See the cookbook’s unlinked people.

Decides, change by change, whether a change to a closed pay period is taken into the open period as an adjustment or refused. A change neither limit refuses is adjusted. Without this step, the policy’s close.late_changes setting decides every change alike.

ParameterDefault
adjust_up_tononeA change is refused when it moves more than this much time. Each category’s change is counted, more or less.
withinnoneA period counted from the close, such as { next = "7d" }. A change recorded on a day it holds none of is refused.
[[layer.step]]
id = "late-changes"
uses = "standard/late_changes"
params = { adjust_up_to = "4h", within = { next = "30d" } }

A change refused names who decided. The stamp of an adjustment line and the detail of a late_change_refused exception give this step and its layers. Or they give close.late_changes and the layers that gave the setting. They give default where no layer did.

See the cookbook’s late change limits.

Decides what keeps a subject of approval from being approved. It also decides who approves its stages. A subject is a day, the period, a category’s lines, an entry, or an assignment’s work. Without an approve step, the approval rules’ own blocked_by_exceptions and approvers apply.

ParameterDefault
blocksevery kind not excusedWhere its rule says exceptions block: the kinds that do.
never_blocksnoneKinds that never block.
routesnoneEach { stage, to, over, categories, attribute }. It sends its stage to to when all it gives holds. That means the subject’s time in categories (default every worked one) is over over. It also means the person’s employment attribute attribute is set on its last day.
[[layer.step]]
id = "approval"
uses = "standard/approval"
params = { never_blocks = ["late"], routes = [{ stage = "manager", to = "director", over = "50h" }] }

See the cookbook’s approval routing.

This is an exporter (payroll export), not a step of a layer. A policy that uses it is an error.

It writes a header row, then one row per person, workday and paid pay category. Categories are in alphabetical order. A category that is not paid is left out.

The columns are person, first, last, workday, category and hours. first and last are the pay period’s first and last day. hours is decimal hours as the ledger has them, "8.00". Days with no lines have no rows.

ParameterDefault
id_attributethe person’s own idThe employment detail that holds the person’s id in the system the file is for (payroll_id). It is read as it stands on the period’s last day. A person without it stops the export, naming them. An id is never made up.
codesthe setup’s codes, else the categoriesThe code of each category (an earning code). It is written in place of the category: { work = "REG", overtime = "OT" }. A category it does not name is written under the code the setup gives it. With codes given, a category with no code either way stops the export. Its hours are not sent under a guessed code.
include_unpaidfalsetrue: the categories that are not paid are written too.
bydayperiod: one row per person and category for the whole period. Its workday is the period’s last.
Terminal window
hourctl -t acme attend export run standard/csv 2026-10-05 --only approved \
--param id_attribute=payroll_id --employer acme-ca -o week.csv

See the cookbook’s payroll export.

This is an exporter (payroll export), not a step of a layer. It writes a daily record of working time as CSV. There is a row for each person, workday and stretch of work.

The stretches are lines from punches in categories, joined where one ends as the next starts. Each row has the person’s id, the workday, the start and end, and the hours. The start and end are wall times with their offset in the day’s zone.

ParameterDefault
id_attributethe person’s own idThe employment detail that holds the person’s id.
categoriesevery categoryThe pay categories whose lines are written: ["work", "overtime"].
uses = "standard/daily_record"
params = { id_attribute = "dni", categories = ["work", "overtime"] }

The recipe shows a common way to keep a record of each day’s start and end of work. Check the rules where you operate. See the cookbook’s Spain daily record.