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
daysFullYear
15
daysPerPerfectMonth
1
longServiceFromYears
3
yearsPerExtraDay
2
maxDays
25
Test vectors (9)
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 — K1 one year at 80%+ attendance: 15 days
given serviceYears
1
given attendance80
yes
given perfectAttendanceMonths
0
given daysTaken
0
expect daysEntitled
15
Case 2 — K2 still 15 at two years
given serviceYears
2
given attendance80
yes
given perfectAttendanceMonths
0
given daysTaken
0
expect daysEntitled
15
Case 3 — K3 three years adds the first extra day: 16
given serviceYears
3
given attendance80
yes
given perfectAttendanceMonths
0
given daysTaken
0
expect daysEntitled
16
Case 4 — K4 five years: 17
given serviceYears
5
given attendance80
yes
given perfectAttendanceMonths
0
given daysTaken
0
expect daysEntitled
17
Case 5 — K5 21 years reaches the 25-day cap
given serviceYears
21
given attendance80
yes
given perfectAttendanceMonths
0
given daysTaken
0
expect daysEntitled
25
Case 6 — K6 and the cap holds at 30 years
given serviceYears
30
given attendance80
yes
given perfectAttendanceMonths
0
given daysTaken
0
expect daysEntitled
25
Case 7 — K7 first year: one day per month of perfect attendance
given serviceYears
0
given attendance80
yes
given perfectAttendanceMonths
7
given daysTaken
0
expect daysEntitled
7
Case 8 — K8 under 80% attendance falls back to the monthly rule
given serviceYears
6
given attendance80
no
given perfectAttendanceMonths
9
given daysTaken
0
expect daysEntitled
9
Case 9 — K9 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.