Working-time account
The rule
Under a working-time account (in Germany, an Arbeitszeitkonto; elsewhere flexitime), hours are not paid as overtime week by week:
- each week, the hours worked over the person’s target are put into an account, and hours under it taken out;
- paid leave counts toward the target, as hours the person did not owe;
- the account has limits, a most it may hold and a most it may be short, agreed by contract or works agreement, and a balance past them is looked at.
Who uses it
Employers in Germany, Austria and Switzerland with flexible working time, and anyone running flexitime with a balance of hours.
How the recipe does it
Configuration only: the package (package.toml) has one layer.
[[layer]]id = "konto"settings = { accruals = { since = "2026-01-05" } }[[layer.step]]id = "account"uses = "standard/time_account"params = { category = "time_account", target = "40h", target_attribute = "weekly_hours" }[[layer.step]]id = "limits"uses = "standard/balance_limit"params = { category = "time_account", above = "40h", below = "-20h", kind = "time_account_limit" }- The account is an accrual category (
time_account) no pay category uses: a balance of hours, more or less than nothing. time_accountearns, each week, the hours counted (hours worked and paid leave, every paid category) less the target: 40 hours, or the person’s own in the employment attributeweekly_hours. A week the person is employed only part of has the target’s share of its days; a week they are not employed moves nothing. Withtarget = "scheduled"the target is the week’s scheduled shifts.balance_limitraisestime_account_limitabout a week whose balance ends above 40 hours or below 20 hours short.
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
time_account: 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
| Step | Parameter | Meaning |
|---|---|---|
time_account | category | The accrual category of the account. |
time_account | target | A week’s target: a duration, or scheduled. |
time_account | target_attribute | The employment attribute holding a person’s own target. |
time_account | counts | The categories counted (default every paid one). |
balance_limit | above, below, kind | The limits of the balance, and what is raised past them. |
What the scenarios show
a-long-week-adds-to-the-account: 45 hours add 5.a-short-week-takes-from-it: 32 hours take 8.paid-leave-counts-toward-the-target: a day of vacation meets the 40.a-part-time-target: 24 hours against 20 add 4.a-balance-past-its-limit-is-flagged: 43 hours, above 40.
Legal note
This is a common way to keep a working-time account; check the rules where you operate. Rules change and vary by agreement: the target, which absences count toward it, the limits, how long a balance may stand, and what happens to it on leaving are the contract’s or the works agreement’s.
Get the recipe
The recipe’s package and its scenarios are in the example packages repository: attendance/working_time_account. 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 = "working_time_account"version = "1.0.0"description = "A working-time account (Arbeitszeitkonto): each week's hours over or under the person's target added to or taken from a balance of hours, and a balance past its limits flagged."
# What the tenant must have set up for the recipe: the steps read these by name.[needs]accrual_categories = ["time_account"]
# Each week, the hours worked and paid leave taken, less the target (40# hours, or the person's own weekly_hours), go into the accrual category# time_account, more or less than nothing. A balance above 40 hours or# below 20 hours short is flagged at the week's end.[[layer]]id = "konto"settings = { accruals = { since = "2026-01-05" } }[[layer.step]]id = "account"uses = "standard/time_account"params = { category = "time_account", target = "40h", target_attribute = "weekly_hours" }[[layer.step]]id = "limits"uses = "standard/balance_limit"params = { category = "time_account", above = "40h", below = "-20h", kind = "time_account_limit" }Scenarios
Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).
38 hours already in the account and 5 more this week: 43, above the 40 allowed, flagged as time_account_limit for the week
description = "38 hours already in the account and 5 more this week: 43, above the 40 allowed, flagged as time_account_limit for the week"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 17:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 17:00", kind = "out" }, { at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 17:00", kind = "out" }, { at = "2026-10-08 08:00", kind = "in" }, { at = "2026-10-08 17:00", kind = "out" }, { at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 17:00", kind = "out" },]
[policy]zone = "Europe/Berlin"
[[accrual_category]]id = "time_account"
[[category]]id = "vacation"worked = false
[[employment]]effective = "2026-10-05"kind = "hired"attributes = {}
[[accrual_adjustment]]category = "time_account"workday = "2026-10-05"amount = "38h"
[expect.period]day = "2026-10-05"balances = { time_account = "43h" }exceptions = [{ kind = "time_account_limit", at = "2026-10-05 00:00" }]Five days of 9 hours, 45, against a target of 40: 5 hours go into the account
description = "Five days of 9 hours, 45, against a target of 40: 5 hours go into the account"
punch = [ { at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 17:00", kind = "out" }, { at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 17:00", kind = "out" }, { at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 17:00", kind = "out" }, { at = "2026-10-08 08:00", kind = "in" }, { at = "2026-10-08 17:00", kind = "out" }, { at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 17:00", kind = "out" },]
[policy]zone = "Europe/Berlin"
[[accrual_category]]id = "time_account"
[[category]]id = "vacation"worked = false
[[employment]]effective = "2026-10-05"kind = "hired"attributes = {}
[expect.period]day = "2026-10-05"accruals = ["2026-10-05 time_account earned 5h"]balances = { time_account = "5h" }A part-time worker's own target, the employment attribute weekly_hours of 20 hours: 24 hours worked add 4
description = "A part-time worker's own target, the employment attribute weekly_hours of 20 hours: 24 hours worked add 4"
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" },]
[policy]zone = "Europe/Berlin"
[[accrual_category]]id = "time_account"
[[category]]id = "vacation"worked = false
[[employment]]effective = "2026-10-05"kind = "hired"attributes = { weekly_hours = "20h" }
[expect.period]day = "2026-10-05"accruals = ["2026-10-05 time_account earned 4h"]balances = { time_account = "4h" }Four days of 8 hours, 32, against 40: 8 hours are taken from the account, which stands 8 hours short
description = "Four days of 8 hours, 32, against 40: 8 hours are taken from the account, which stands 8 hours short"
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" },]
[policy]zone = "Europe/Berlin"
[[accrual_category]]id = "time_account"
[[category]]id = "vacation"worked = false
[[employment]]effective = "2026-10-05"kind = "hired"attributes = {}
[expect.period]day = "2026-10-05"accruals = ["2026-10-05 time_account earned -8h"]balances = { time_account = "-8h" }Four days of 8 hours and a day of paid vacation, 8 hours: the 40 are met and the account does not move
description = "Four days of 8 hours and a day of paid vacation, 8 hours: the 40 are met and the account does not move"
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" },]
[policy]zone = "Europe/Berlin"
[[accrual_category]]id = "time_account"
[[category]]id = "vacation"worked = false
[[employment]]effective = "2026-10-05"kind = "hired"attributes = {}
[[leave]]id = "v1"category = "vacation"days = { "2026-10-09" = "8h" }recorded = "2026-09-01 09:00"
[[approval]]subject = "leave:v1:2026-10-09"stage = "approval"decision = "approve"recorded = "2026-09-01 10:00"
[expect.period]day = "2026-10-05"accruals = []balances = {}