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
daysYears1to2
7
daysYear3
8
daysYear4
9
daysYear5
10
daysYear6
11
daysYear7
12
daysYear8
13
daysYear9Plus
14
bandYear2
2
bandYear3
3
bandYear4
4
bandYear5
5
bandYear6
6
bandYear7
7
bandYear8
8
bandYear9
9
qualifyingYears
1
Test vectors (11)
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 under a year there is no entitlement yet
given serviceYears
0
given daysTaken
0
expect daysEntitled
0
Case 2 — N2 the first year gives 7
given serviceYears
1
given daysTaken
0
expect daysEntitled
7
Case 3 — N3 the SECOND year also gives 7 — the table does not step yet
given serviceYears
2
given daysTaken
0
expect daysEntitled
7
Case 4 — N4 the third year is the first increase, to 8
given serviceYears
3
given daysTaken
0
expect daysEntitled
8
Case 5 — N5 the fifth year is 10
given serviceYears
5
given daysTaken
0
expect daysEntitled
10
Case 6 — N6 the eighth year is 13
given serviceYears
8
given daysTaken
0
expect daysEntitled
13
Case 7 — N7 nine years reaches the maximum of 14
given serviceYears
9
given daysTaken
0
expect daysEntitled
14
Case 8 — N8 and it stays at 14 thereafter
given serviceYears
30
given daysTaken
0
expect daysEntitled
14
Case 9 — N9 a part year does not move the band
given serviceYears
4.9
given daysTaken
0
expect completedYears
4
expect daysEntitled
9
Case 10 — N10 days already taken come off the remainder
given serviceYears
9
given daysTaken
5
expect daysRemaining
9
Case 11 — N11 taking more than the entitlement never goes 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.