Leave on a public holiday draws nothing
The rule
Almost everywhere (the UK, the EU, Australia, the UAE, and most US paid-time-off policies), a day of leave that falls on a public holiday is not a day of leave: the person is paid the holiday and the day is not taken from their balance. A week off with a public holiday in it uses the other days.
Who uses it
Every employer that pays leave from a balance and has public holidays. The rule matters most when a holiday is announced after leave was asked for or approved (a day declared a holiday by decree, a one-off day for a national event): the days already booked on it come back to the balance, the holiday is paid once, and nobody has to correct anything by hand.
How the recipe does it
Configuration only: a package (package.toml) of one layer.
[[layer]]id = "leave-on-holidays"[[layer.step]]id = "holidays"uses = "standard/leave_not_on_holidays"params = {}[[layer.step]]id = "balance"uses = "standard/leave_balance"params = { balance = { vacation = "pto" } }[[layer.step]]id = "holiday"uses = "standard/holiday_pay"params = { time = "8h", category = "holiday" }leave_not_on_holidays is a leave step: it books no time on a day of the
request that is a holiday the day observes (ctx:book(date, 0)). What a day
books is what it draws from a balance, what its line in the ledger has, and
what the balance checks of every other request count, a pending one’s too, so
a request and the ledger agree. List the step before the ones that check the
balance, as above, so that they count the days as booked.
Later holidays are taken in as the ledger is worked out again: leave approved, then a holiday added on that day, has its hours back in the balance and the holiday paid once. If the day is in a pay period already closed, the closed period stays as it was paid and the difference is an adjustment in the period open when the holiday was added, as any late change is.
Holidays that pay differently, such as regular holidays and special
non-working days, are told apart as every holiday rule does: holidays = ["new_year", ...] names the ones a step is for, and a second copy of the
step with the other ids (and its own categories) treats them another way.
Parameters
| Parameter | Meaning |
|---|---|
holidays | true (the default): every holiday the day observes; a list: those holidays; false: none. |
categories | The leave categories it applies to (default every category). |
What the scenarios show
a-holiday-in-a-week-off-draws-only-the-other-days: five days asked, one a holiday: 32 hours drawn, so a 36-hour balance is enough, and the holiday is paid.without-the-recipe-the-holiday-is-drawn: the same request without the step draws all 40 hours and is refused.
Legal note
This is the usual practice, and in many places the law: check the rules where you operate and any contract that applies. Some employers or agreements charge leave that was approved before a holiday was announced.
Get the recipe
The recipe’s package and its scenarios are in the example packages repository: attendance/leave_on_holidays. 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 = "leave_on_holidays"version = "1.0.0"description = "A day of leave on a public holiday draws nothing from the leave balance: the holiday is paid as the holiday, and the balance checks of other requests count the day as it is booked."
# What a request's day books is decided here, before the balance is checked:# a day on a holiday the person's day observes books no time. The holiday is# paid 8 hours, in a category the tenant sets up as not worked.[needs]accrual_categories = ["pto"]
[[layer]]id = "leave-on-holidays"[[layer.step]]id = "holidays"uses = "standard/leave_not_on_holidays"params = {}[[layer.step]]id = "balance"uses = "standard/leave_balance"params = { balance = { vacation = "pto" } }[[layer.step]]id = "holiday"uses = "standard/holiday_pay"params = { time = "8h", category = "holiday" }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 week off of five days with a holiday in it draws four days from the balance: 40 hours of pto asked on Monday to Friday 5 to 9 October 2026, Thursday the 8th a holiday, draws 32. With 36 hours in the balance the request stands; without the recipe it would leave -4 and be refused
description = "A week off of five days with a holiday in it draws four days from the balance: 40 hours of pto asked on Monday to Friday 5 to 9 October 2026, Thursday the 8th a holiday, draws 32. With 36 hours in the balance the request stands; without the recipe it would leave -4 and be refused"
[policy]zone = "America/Chicago"pay_periods = { month_days = [1] }accruals = { since = "2026-09-01" }
[[category]]id = "vacation"worked = false
[[category]]id = "holiday"worked = false
[[accrual_category]]id = "pto"uses = ["vacation"]
[[holiday]]id = "harvest"name = "Harvest day"month = 10day = 8
[[accrual_adjustment]]category = "pto"workday = "2026-09-15"amount = "36h"recorded = "2026-09-15 09:00"
[[leave]]id = "week"category = "vacation"days = { "2026-10-05" = "8h", "2026-10-06" = "8h", "2026-10-07" = "8h", "2026-10-08" = "8h", "2026-10-09" = "8h" }recorded = "2026-09-20 09:00"
[expect.period]day = "2026-10-05"leave = ["week pending approval"]allocations = ["2026-10-08 untimed holiday 8.00"]With the recipe's step turned off the same week off draws all five days, 40 hours: with 36 in the balance it would leave -4 and the balance check refuses it
description = "With the recipe's step turned off the same week off draws all five days, 40 hours: with 36 in the balance it would leave -4 and the balance check refuses it"
[policy]zone = "America/Chicago"pay_periods = { month_days = [1] }accruals = { since = "2026-09-01" }
[[category]]id = "vacation"worked = false
[[category]]id = "holiday"worked = false
[[accrual_category]]id = "pto"uses = ["vacation"]
[[holiday]]id = "harvest"name = "Harvest day"month = 10day = 8
[[accrual_adjustment]]category = "pto"workday = "2026-09-15"amount = "36h"recorded = "2026-09-15 09:00"
[[leave]]id = "week"category = "vacation"days = { "2026-10-05" = "8h", "2026-10-06" = "8h", "2026-10-07" = "8h", "2026-10-08" = "8h", "2026-10-09" = "8h" }recorded = "2026-09-20 09:00"
# The recipe's step that books the holiday off is turned off.[[layer]]id = "without"[[layer.step]]id = "holidays"change = "disable"
[expect.period]day = "2026-10-05"leave = ["week refused: it would leave the pto balance below 0h"]