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
baseFive
20
baseSix
24
capFive
22
capSix
26
tenYearFive
25
tenYearSix
30
sameEmployerYears
10
anyEmployerYearsThreshold
12
longServiceYears
25
longFive
26
longSix
31
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 — GR1 half of the first year on a five-day week: 10 days
given weekSystem
five
given serviceYears
0
given anyEmployerYears
0
given monthsInFirstYear
6
given daysTaken
0
expect daysEntitled
10
Case 2 — GR2 one completed year: 20
given weekSystem
five
given serviceYears
1
given anyEmployerYears
1
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
20
Case 3 — GR3 two years: 21
given weekSystem
five
given serviceYears
2
given anyEmployerYears
2
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
21
Case 4 — GR4 three years reaches 22 and stays there
given weekSystem
five
given serviceYears
7
given anyEmployerYears
7
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
22
Case 5 — GR5 ten years with the same employer: 25
given weekSystem
five
given serviceYears
10
given anyEmployerYears
10
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
25
Case 6 — GR6 twelve years with any employer: 25 even after only 3 with this one
given weekSystem
five
given serviceYears
3
given anyEmployerYears
12
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
25
Case 7 — GR7 twenty-five years: 26
given weekSystem
five
given serviceYears
25
given anyEmployerYears
25
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
26
Case 8 — GR8 six-day week: 24, then 26, then 31
given weekSystem
six
given serviceYears
30
given anyEmployerYears
30
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
31
Case 9 — GR9 six-day week, one year: 24
given weekSystem
six
given serviceYears
1
given anyEmployerYears
1
given monthsInFirstYear
12
given daysTaken
0
expect daysEntitled
24
Case 10 — GR10 days taken never push the remainder negative
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.