Sick leave, one hour for every 30 worked
The rule
Every 30 hours worked earn one hour of paid sick leave, counted in proportion (15 hours earn 30 minutes). All hours worked count, overtime included. Earning stops while the balance is at a cap; sick leave taken draws the balance down and makes room again.
Who uses it
Employers in California and in the many cities and states with a paid sick leave law built the same way, and employers anywhere who give sick leave by hours worked rather than as a yearly grant.
How the recipe does it
Configuration only: a package (package.toml) of one layer, with weekly
overtime past 40 hours and the standard accrue step. The accrual and
pay categories are the tenant’s own setup.
[[layer]]id = "sick-leave"settings = { accruals = { since = "2026-10-05" } } # balances run on from this day[[layer.step]]id = "weekly"uses = "standard/threshold"params = { over = "40h", to = "overtime", window = "week" }[[layer.step]]id = "sick"uses = "standard/accrue"params = { category = "sick", earn = "1h", per = "30h", cap = "48h" }
[[accrual_category]] # the balance, drawn down by time in "sick"id = "sick"uses = ["sick"]
[[category]] # sick leave is paid, not workedid = "sick"worked = falseaccrue runs on each pay period: it adds up the worked time and earns
earn for every per of it, to the millisecond, never rounded up. With a
cap, it earns only what fits under the cap, given the balance so far
(this period’s leave taken and adjustments included). Sick leave taken is a
leave request (or an hours entry) in the sick category: it is paid, is
not worked time, so earns nothing, and is drawn from the balance.
What your setup needs
Set up before you adopt the recipe; the recipe’s steps read them by name, and adopting it is refused, with a list of what is missing, until they exist.
- A balance called
sick: an accrual category. The recipe earns into it, takes from it or reads it.
The scenarios show each as it was set up for them.
Parameters
| Parameter | Meaning |
|---|---|
category | The accrual category earned. |
earn, per | How much is earned for how much counted: "1h" for every "30h". |
cap | The most the balance may reach (optional). |
counts | The categories counted (default every worked one). |
What the scenarios show
thirty-hours-earn-an-hour: exactly 30 hours earn an hour; 29 earn 58 minutes; the balance runs on to the next week.overtime-earns-too: 45 hours, 5 of them overtime, earn 90 minutes; sick leave taken is paid, earns nothing and is drawn down.earning-stops-at-the-cap: at 47 hours 30 minutes, a week earns only the 30 minutes left under 48.used-leave-makes-room-again: after a day used, a week earns in full.
Legal note
This is a common way companies implement accrued paid sick leave; check the rules where you operate (the accrual rate, which hours count, the cap, how much may be used a year, and when new hires start earning and using it).
Get the recipe
The recipe’s package and its scenarios are in the example packages repository: attendance/sick_leave_one_per_thirty. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.
The policy package
The package’s layers, with the standard steps each one runs and their settings:
name = "sick_leave_one_per_thirty"version = "1.0.0"description = "Paid sick leave earned at one hour for every 30 hours worked, in proportion, up to a cap, drawn down by sick leave taken."
# What the tenant must have set up for the recipe: the steps read these by name.[needs]accrual_categories = ["sick"]
# Balances kept from October 5, 2026. Time past 40 hours a week is# overtime; every 30 hours worked, overtime included, earn an hour of sick# leave, up to a balance of 48 hours.[[layer]]id = "sick-leave"settings = { accruals = { since = "2026-10-05" } }[[layer.step]]id = "weekly"uses = "standard/threshold"params = { over = "40h", to = "overtime", window = "week" }[[layer.step]]id = "sick"uses = "standard/accrue"params = { category = "sick", earn = "1h", per = "30h", cap = "48h" }Scenarios
Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).
A balance brought over by hand at 47 hours 30 minutes: a 40-hour week would earn 1 hour 20 minutes, but earning stops at the 48-hour cap, so it earns 30 minutes
description = "A balance brought over by hand at 47 hours 30 minutes: a 40-hour week would earn 1 hour 20 minutes, but earning stops at the 48-hour cap, so it earns 30 minutes"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" }, { at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 16:00", kind = "out" }, { at = "2026-10-08 08:00", kind = "in" }, { at = "2026-10-08 16:00", kind = "out" }, { at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 16:00", kind = "out" },]
[policy]zone = "America/Los_Angeles"
[[accrual_category]]id = "sick"uses = ["sick"]
[[category]]id = "sick"worked = false
[[accrual_adjustment]]category = "sick"workday = "2026-10-05"amount = "47h 30m"reason = "balance brought over from the old system"
[expect.period]day = "2026-10-05"accruals = ["2026-10-05 sick adjusted 47h 30m", "2026-10-05 sick earned 30m"]balances = { sick = "48h" }Every hour worked earns, overtime included: 45 hours, five of them weekly overtime, earn an hour and a half. Sick leave taken is paid but not worked, so it earns nothing, and draws the balance down
description = "Every hour worked earns, overtime included: 45 hours, five of them weekly overtime, earn an hour and a half. Sick leave taken is paid but not worked, so it earns nothing, and draws the balance down"
punch = [ { at = "2026-10-05 07:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" }, { at = "2026-10-06 07:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" }, { at = "2026-10-07 07:00", kind = "in" }, { at = "2026-10-07 16:00", kind = "out" }, { at = "2026-10-08 07:00", kind = "in" }, { at = "2026-10-08 16:00", kind = "out" }, { at = "2026-10-09 07:00", kind = "in" }, { at = "2026-10-09 16:00", kind = "out" },]
[policy]zone = "America/Los_Angeles"
[[accrual_category]]id = "sick"uses = ["sick"]
[[category]]id = "sick"worked = false
# Two hours of sick leave the next Monday, approved (no approval rule).[[leave]]category = "sick"days = { "2026-10-12" = "2h" }
[[approval]]subject = "leave:lv1:2026-10-12"stage = "approval"decision = "approve"recorded = "2026-10-12 00:00"
[expect.period]day = "2026-10-05"accruals = ["2026-10-05 sick earned 1h 30m"]balances = { sick = "1h 30m" }
[expect]week = "2026-10-12"allocations = ["2026-10-12 untimed sick 2.00"]Exactly 30 hours worked earn exactly one hour of sick leave; the next week's 29 hours earn 58 minutes, in proportion, never rounded up. The balance runs on from one week to the next
description = "Exactly 30 hours worked earn exactly one hour of sick leave; the next week's 29 hours earn 58 minutes, in proportion, never rounded up. The balance runs on from one week to the next"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 18:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 18:00", kind = "out" }, { at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 18:00", kind = "out" }, { at = "2026-10-12 08:00", kind = "in" }, { at = "2026-10-12 18:00", kind = "out" }, { at = "2026-10-13 08:00", kind = "in" }, { at = "2026-10-13 18:00", kind = "out" }, { at = "2026-10-14 08:00", kind = "in" }, { at = "2026-10-14 17:00", kind = "out" },]
[policy]zone = "America/Los_Angeles"
[[accrual_category]]id = "sick"uses = ["sick"]
[[category]]id = "sick"worked = false
[expect.period]day = "2026-10-12"accruals = ["2026-10-12 sick earned 58m"]balances = { sick = "1h 58m" }At the 48-hour cap, a day of sick leave used makes room again: the next week's 32 hours earn 1 hour 4 minutes in full, from a balance of 40 hours
description = "At the 48-hour cap, a day of sick leave used makes room again: the next week's 32 hours earn 1 hour 4 minutes in full, from a balance of 40 hours"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:00", kind = "out" }, { at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 16:00", kind = "out" }, { at = "2026-10-08 08:00", kind = "in" }, { at = "2026-10-08 16:00", kind = "out" }, { at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 16:00", kind = "out" }, { at = "2026-10-13 08:00", kind = "in" }, { at = "2026-10-13 16:00", kind = "out" }, { at = "2026-10-14 08:00", kind = "in" }, { at = "2026-10-14 16:00", kind = "out" }, { at = "2026-10-15 08:00", kind = "in" }, { at = "2026-10-15 16:00", kind = "out" }, { at = "2026-10-16 08:00", kind = "in" }, { at = "2026-10-16 16:00", kind = "out" },]
[policy]zone = "America/Los_Angeles"
[[accrual_category]]id = "sick"uses = ["sick"]
[[category]]id = "sick"worked = false
[[accrual_adjustment]]category = "sick"workday = "2026-10-05"amount = "47h 30m"reason = "balance brought over from the old system"
# A day of sick leave the next Monday.[[leave]]category = "sick"days = { "2026-10-12" = "8h" }
[[approval]]subject = "leave:lv1:2026-10-12"stage = "approval"decision = "approve"recorded = "2026-10-12 00:00"
[expect.period]day = "2026-10-12"accruals = ["2026-10-12 sick used -8h", "2026-10-12 sick earned 1h 4m"]balances = { sick = "41h 4m" }