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
statutoryVirkedager
25
statutoryBasisDays
6
extraVirkedagerAge60
6
age60Threshold
60
lateStartVirkedager
6
Test vectors (8)
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 — J1 a five-day week is 21 days — four weeks plus the one day over, not 25
given daysPerWeek
5
given age
40
given startedAfterSep30
no
given daysTaken
0
expect totalVirkedager
25
expect fullWeeks
4
expect remainderDays
1
expect daysEntitled
21
Case 2 — J2 a six-day week reproduces the statutory figure exactly
given daysPerWeek
6
given age
40
given startedAfterSep30
no
given daysTaken
0
expect daysEntitled
25
Case 3 — J3 § 5(2): turning 60 adds six virkedager, which is a sixth week
given daysPerWeek
5
given age
60
given startedAfterSep30
no
given daysTaken
0
expect extraVirkedager
6
expect totalVirkedager
31
expect fullWeeks
5
expect daysEntitled
26
Case 4 — J4 the bonus starts AT 60, so 59 is still the ordinary entitlement
given daysPerWeek
5
given age
59
given startedAfterSep30
no
given daysTaken
0
expect extraVirkedager
0
expect daysEntitled
21
Case 5 — J5 § 5(3): starting after 30 September is six virkedager, one week
given daysPerWeek
5
given age
40
given startedAfterSep30
yes
given daysTaken
0
expect baseVirkedager
6
expect fullWeeks
1
expect remainderDays
0
expect daysEntitled
5
Case 6 — J6 a late starter over 60 still gets the § 5(2) bonus on top
given daysPerWeek
5
given age
62
given startedAfterSep30
yes
given daysTaken
0
expect totalVirkedager
12
expect daysEntitled
10
Case 7 — J7 a three-day week: four weeks plus the day over
given daysPerWeek
3
given age
40
given startedAfterSep30
no
given daysTaken
0
expect daysEntitled
13
Case 8 — J8 days already taken come off the remainder, and it 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.