The expressions above read these as $const. They are the figures the annual refresh replaces, so they live as data rather than being written into the formulas — which is what makes a year-on-year change a one-line diff instead of an edit to arithmetic.
Constant
Value
accrualDaysPerMonth
2.5
accrualDaysPerMonthShortService
2
statutoryBasisDays
6
qualifyingDaysPerMonth
14
qualifyingHoursPerMonth
35
monthsPerLeaveYear
12
Test vectors (10)
Every case is executed against this model on each build, by the Java engine and independently by a JavaScript one. A mismatch of a single cent fails the build, so the page cannot ship advertising a figure the model no longer produces.
Case 1 — N1 a full year on a five-day week is 25 working days, not the 30 that gets published
given qualifyingMonths
12
given serviceUnderOneYear
no
given daysPerWeek
5
given daysTaken
0
expect arkipaivaEntitled
30
expect weeksEntitled
5
expect daysEntitled
25
Case 2 — N2 a six-day week is where the statutory 30 arkipäivää lands as 30 days
given qualifyingMonths
12
given serviceUnderOneYear
no
given daysPerWeek
6
given daysTaken
0
expect daysEntitled
30
Case 3 — N3 under a year of service accrues 2 a month, so a full year is 24 arkipäivää = 20 days
given qualifyingMonths
12
given serviceUnderOneYear
yes
given daysPerWeek
5
given daysTaken
0
expect accrualRate
2
expect arkipaivaEntitled
24
expect daysEntitled
20
Case 4 — N4 5 § rounds a part day UP: 7 months x 2,5 is 17,5 and therefore 18 arkipäivää
given qualifyingMonths
7
given serviceUnderOneYear
no
given daysPerWeek
5
given daysTaken
0
expect arkipaivaEntitled
18
expect daysEntitled
15
Case 5 — N5 an odd month count on the short-service rate needs no rounding at all
given qualifyingMonths
7
given serviceUnderOneYear
yes
given daysPerWeek
5
given daysTaken
0
expect arkipaivaEntitled
14
Case 6 — N6 no qualifying month earns nothing
given qualifyingMonths
0
given serviceUnderOneYear
no
given daysPerWeek
5
given daysTaken
0
expect arkipaivaEntitled
0
expect daysEntitled
0
Case 7 — N7 a four-day week gets four fifths of the five-day answer
given qualifyingMonths
12
given serviceUnderOneYear
no
given daysPerWeek
4
given daysTaken
0
expect daysEntitled
20
Case 8 — N8 days already taken come off the remainder
given qualifyingMonths
12
given serviceUnderOneYear
no
given daysPerWeek
5
given daysTaken
10
expect daysRemaining
15
Case 9 — N9 taking more than the entitlement never goes negative
given qualifyingMonths
12
given serviceUnderOneYear
no
given daysPerWeek
5
given daysTaken
40
expect daysRemaining
0
Case 10 — N10 twelve qualifying months is the ceiling the leave year sets
The whole model as JSON — inputs, outputs, formulas, vectors and sources in one re-runnable document.
This model is published under CC BY 4.0: use it, adapt it, build on it, with attribution. The licence covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds are law, and nobody licenses those; the sources above are where they come from.