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
daysUnder10Years
20
daysFrom10Years
26
serviceThresholdYears
10
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 — L1 under ten years' employment, full time: 20 days
given serviceYears
5
given employmentPercent
100
given daysTaken
0
expect fullTimeDays
20
expect daysEntitled
20
Case 2 — L2 at ten years it steps to 26 — there is nothing in between
given serviceYears
10
given employmentPercent
100
given daysTaken
0
expect fullTimeDays
26
expect daysEntitled
26
Case 3 — L3 nine years is still the lower band: “co najmniej 10 lat” is at least ten
given serviceYears
9
given employmentPercent
100
given daysTaken
0
expect fullTimeDays
20
expect daysEntitled
20
Case 4 — L4 3/4 etatu on the 26-day band is 19.5, which § 2 rounds UP to 20
given serviceYears
12
given employmentPercent
75
given daysTaken
0
expect proportionalDays
19.5
expect daysEntitled
20
Case 5 — L5 half time on the 20-day band is exactly 10, so the round-up changes nothing
given serviceYears
3
given employmentPercent
50
given daysTaken
0
expect proportionalDays
10
expect daysEntitled
10
Case 6 — L6 a third of full time on the lower band: 6.667 rounds up to 7
given serviceYears
3
given employmentPercent
33
given daysTaken
0
expect daysEntitled
7
Case 7 — L7 § 3's ceiling: the pro-rated figure can never exceed § 1's
given serviceYears
30
given employmentPercent
100
given daysTaken
0
expect daysEntitled
26
Case 8 — L8 days already taken come off the remainder, and it never goes negative
given serviceYears
12
given employmentPercent
100
given daysTaken
30
expect daysRemaining
0
Case 9 — L9 days taken below the entitlement leave the balance
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.