Skip to content

Floating holidays

The rule

Each year everyone has two floating holidays: days off with pay that they pick themselves (a birthday, a religious or cultural holiday the company calendar does not observe).

  • The two days, 16 hours, are given on January 1.
  • A floating holiday is taken as a whole day, as leave, from that balance, from the first day of the year; a third day, or half a day, is refused.
  • Days not taken by the year’s end are lost: what is left on January 1 is forfeited before the new year’s days are given.

Who uses it

Employers that give a few days off each year for the person to choose, instead of (or as well as) fixed company holidays.

How the recipe does it

Configuration only: a package (package.toml) of one layer, with monthly pay periods and balances kept from January 1, 2026, and the accrual category floating, which the leave category floating uses. Four business rules, each a step of its own:

[[layer.step]]
id = "forfeit"
uses = "standard/carryover"
params = { category = "floating", limit = "0h" }
[[layer.step]]
id = "grant"
uses = "standard/grant"
params = { category = "floating", amount = "16h" }
[[layer.step]]
id = "balance"
uses = "standard/leave_balance"
params = { balance = { floating = "floating" } }
[[layer.step]]
id = "whole-days"
uses = "standard/leave_increment"
params = { categories = ["floating"], increment = "8h" }

carryover with a limit of nothing forfeits the whole balance as the year starts; grant gives the year’s 16 hours on January 1 (and a person hired during the year the months left); leave_balance refuses a day the balance does not hold, the grant counted from the day it is given, so a day in the first week of January is taken from it; leave_increment refuses part of a day.

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 floating: 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

StepParameterMeaning
carryoverlimit0h: nothing carries into the new year.
grantamountThe year’s floating holidays, in hours (16h: two days of eight hours).
grantyearWhen the year starts (default January 1).
leave_balancebalanceThe leave category and the balance it draws on.
leave_incrementincrementA whole day (8h).

What the scenarios show

  • two-days-granted-on-january-1: 16 hours given on January 1; one day taken leaves 8.
  • unused-days-are-forfeited-at-the-new-year: the 8 hours left at the year’s end are forfeited, and the new year’s 16 given.
  • a-third-day-is-refused: both days taken, a third is refused.
  • a-half-day-is-refused: half a day is refused.
  • a-new-year-gives-two-more-days: both days taken in 2026, a day in January 2027 is approved.

Where floating holidays count as vacation or paid time off under state law, unused days may have to carry over or be paid out on leaving instead of being forfeited. Check the rules where you operate.

Get the recipe

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

floating_holidays/package.toml
name = "floating_holidays"
version = "1.0.0"
description = "Two floating holidays a year, days the person picks: granted as a balance on January 1, taken as whole days of leave, and forfeited at the year's end if unused."
# What the tenant must have set up for the recipe: the steps read these by name.
[needs]
accrual_categories = ["floating"]
# Monthly pay periods; balances kept from January 1, 2026. On January 1
# what is left of the floating holiday balance is forfeited and the year's
# two days (16 hours) are granted; a floating holiday is taken as a whole
# day of eight hours, only from the balance.
[[layer]]
id = "floating"
settings = { pay_periods = { month_days = [1] }, accruals = { since = "2026-01-01" } }
[[layer.step]]
id = "forfeit"
uses = "standard/carryover"
params = { category = "floating", limit = "0h" }
[[layer.step]]
id = "grant"
uses = "standard/grant"
params = { category = "floating", amount = "16h" }
[[layer.step]]
id = "balance"
uses = "standard/leave_balance"
params = { balance = { floating = "floating" } }
[[layer.step]]
id = "whole-days"
uses = "standard/leave_increment"
params = { categories = ["floating"], increment = "8h" }

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 floating holiday is a whole day: half a day is refused
scenarios/a-half-day-is-refused.toml
description = "A floating holiday is a whole day: half a day is refused"
[policy]
zone = "America/Chicago"
[[category]]
id = "floating"
worked = false
[[accrual_category]]
id = "floating"
uses = ["floating"]
[[employment]]
effective = "2024-03-04"
kind = "hired"
[[leave]]
id = "f1"
category = "floating"
days = { "2026-02-16" = "4h" }
recorded = "2026-02-02 09:00"
[expect.period]
day = "2026-02-16"
leave = ["f1 refused: 2026-02-16: 4h is not a whole number of 8h"]
Both floating holidays taken in 2026: a day in January 2027 is the new year's first, and is approved
scenarios/a-new-year-gives-two-more-days.toml
description = "Both floating holidays taken in 2026: a day in January 2027 is the new year's first, and is approved"
[policy]
zone = "America/Chicago"
[[category]]
id = "floating"
worked = false
[[accrual_category]]
id = "floating"
uses = ["floating"]
[[employment]]
effective = "2024-03-04"
kind = "hired"
[[leave]]
id = "f1"
category = "floating"
days = { "2026-02-16" = "8h" }
recorded = "2026-02-02 09:00"
[[approval]]
subject = "leave:f1:2026-02-16"
stage = "approval"
decision = "approve"
recorded = "2026-02-02 10:00"
[[leave]]
id = "f2"
category = "floating"
days = { "2026-04-06" = "8h" }
recorded = "2026-03-23 09:00"
[[approval]]
subject = "leave:f2:2026-04-06"
stage = "approval"
decision = "approve"
recorded = "2026-03-23 10:00"
[[leave]]
id = "f3"
category = "floating"
days = { "2027-01-18" = "8h" }
recorded = "2027-01-04 09:00"
[[approval]]
subject = "leave:f3:2027-01-18"
stage = "approval"
decision = "approve"
recorded = "2027-01-04 10:00"
[expect.period]
day = "2027-01-18"
leave = ["f3 approved"]
balances = { floating = "8h" }
Both floating holidays taken, in February and April: a third, in June, would leave the balance below nothing: refused
scenarios/a-third-day-is-refused.toml
description = "Both floating holidays taken, in February and April: a third, in June, would leave the balance below nothing: refused"
[policy]
zone = "America/Chicago"
[[category]]
id = "floating"
worked = false
[[accrual_category]]
id = "floating"
uses = ["floating"]
[[employment]]
effective = "2024-03-04"
kind = "hired"
[[leave]]
id = "f1"
category = "floating"
days = { "2026-02-16" = "8h" }
recorded = "2026-02-02 09:00"
[[approval]]
subject = "leave:f1:2026-02-16"
stage = "approval"
decision = "approve"
recorded = "2026-02-02 10:00"
[[leave]]
id = "f2"
category = "floating"
days = { "2026-04-06" = "8h" }
recorded = "2026-03-23 09:00"
[[approval]]
subject = "leave:f2:2026-04-06"
stage = "approval"
decision = "approve"
recorded = "2026-03-23 10:00"
[[leave]]
id = "f3"
category = "floating"
days = { "2026-06-15" = "8h" }
recorded = "2026-06-01 09:00"
[expect.period]
day = "2026-06-15"
leave = ["f3 refused: it would leave the floating balance below 0h"]
The year's two floating holidays, 16 hours, are granted on January 1. The person picks January 19, their birthday, in the year's first pay period: it is taken from the grant, and 8 hours are left
scenarios/two-days-granted-on-january-1.toml
description = "The year's two floating holidays, 16 hours, are granted on January 1. The person picks January 19, their birthday, in the year's first pay period: it is taken from the grant, and 8 hours are left"
[policy]
zone = "America/Chicago"
[[category]]
id = "floating"
worked = false
[[accrual_category]]
id = "floating"
uses = ["floating"]
[[employment]]
effective = "2024-03-04"
kind = "hired"
[[leave]]
id = "f1"
category = "floating"
days = { "2026-01-19" = "8h" }
recorded = "2026-01-05 09:00"
[[approval]]
subject = "leave:f1:2026-01-19"
stage = "approval"
decision = "approve"
recorded = "2026-01-05 10:00"
[expect.period]
day = "2026-01-01"
leave = ["f1 approved"]
accruals = ["2026-01-19 floating used -8h", "2026-01-01 floating earned 16h"]
balances = { floating = "8h" }
One floating holiday taken in March 2026 leaves 8 hours unused at the year's end: on January 1, 2027 they are forfeited and the new year's 16 hours granted
scenarios/unused-days-are-forfeited-at-the-new-year.toml
description = "One floating holiday taken in March 2026 leaves 8 hours unused at the year's end: on January 1, 2027 they are forfeited and the new year's 16 hours granted"
[policy]
zone = "America/Chicago"
[[category]]
id = "floating"
worked = false
[[accrual_category]]
id = "floating"
uses = ["floating"]
[[employment]]
effective = "2024-03-04"
kind = "hired"
[[leave]]
id = "f1"
category = "floating"
days = { "2026-03-16" = "8h" }
recorded = "2026-03-02 09:00"
[[approval]]
subject = "leave:f1:2026-03-16"
stage = "approval"
decision = "approve"
recorded = "2026-03-02 10:00"
[expect.period]
day = "2027-01-01"
accruals = ["2027-01-01 floating forfeited -8h", "2027-01-01 floating earned 16h"]
balances = { floating = "16h" }