All documentation

Time and leave

How leave works

Policies as data, an insert-only ledger, and the unit distinction that causes most leave bugs.

Leave is configured as policy data, resolved by jurisdiction. There is no code branch on a country: if a rule cannot be expressed, the missing thing is a field on the policy, not an exception for that country.

Working days or calendar days

The single biggest source of leave errors

Georgia grants 24 working days, so only scheduled days are deducted. The UAE grants 30 calendar days, so weekends and public holidays falling inside the absence are deducted too. Two weeks off is ten days under one and fourteen under the other.

Fields that exist because a real jurisdiction needed them

Cycle length
South Africa grants 30 sick days per 36-month cycle. A hardcoded leave year cannot represent it.
Tenure bands
Mexico's vacation ladder rises from 12 days to 20 by year five, then two more every five years. The longest qualifying band wins.
Who funds each tier
Georgian maternity leave is largely state-funded with an employer top-up. Payroll cannot split the cost without knowing which part is not the employer's.

How an allowance is earned in the first place, when it resets and what survives the reset is its own subject — see Entitlement, accrual and carryover.

The ledger

Every credit and deduction is an entry. A balance is the sum of those entries per person, per leave type and per engagement — there is no stored balance that could drift from them. Nothing is ever edited or deleted; a correction posts a reversal pointing at the original.

Balances are held per engagement

Two concurrent engagements are two employers, each owing leave under its own jurisdiction at its own FTE. A single pooled balance gets both halves wrong: it lets one entity's accrual fund an absence from the other, and credits somebody once for entitlement two employers owe.

  • Accrual and rollover run per engagement, and skip contractors — a contractor holds no statutory entitlement. Both run nightly; see Scheduled jobs.
  • A request from somebody holding two engagements must say which one it is against. Guessing would decide which entity carries the liability.
  • The decision routes to that engagement's manager, and the whole chain is anchored on it.
  • Minutes with no engagement attached — from before an upgrade, or accrued while somebody held none — belong to the single engagement where there is only one, and are reported separately where there are two or more.

Requesting and approving

Individual days are written out when a request is submitted, so capacity queries read an indexed range rather than replaying policy arithmetic for every person on every board render. Approval routing is described under Approvals and delegation.

An approval emits an event carrying the computed pay bands, the engagement and the legal entity, because two concurrent engagements file with two payrolls.