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
acquisitionMonths
12
bandDaysTo5Absences
30
bandDaysTo14Absences
24
bandDaysTo23Absences
18
bandDaysTo32Absences
12
absenceLimit5
5
absenceLimit14
14
absenceLimit23
23
absenceLimit32
32
daysPerCalendarWeek
7
Test vectors (12)
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 a clean year is 30 dias corridos, about 21.4 working days on a five-day week
given monthsWorked
12
given unjustifiedAbsences
0
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
30
expect daysEntitled
21.4
Case 2 — N2 five absences is still band I, because the article says 'not more than five'
given monthsWorked
12
given unjustifiedAbsences
5
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
30
Case 3 — N3 the sixth absence costs six days of leave at once
given monthsWorked
12
given unjustifiedAbsences
6
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
24
expect daysEntitled
17.1
Case 4 — N4 the seventh costs nothing further — the band is flat to fourteen
given monthsWorked
12
given unjustifiedAbsences
14
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
24
Case 5 — N5 fifteen absences drops to 18 corridos
given monthsWorked
12
given unjustifiedAbsences
15
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
18
expect daysEntitled
12.9
Case 6 — N6 twenty-four drops to the lowest band, 12 corridos or about 8.6 working days
given monthsWorked
12
given unjustifiedAbsences
24
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
12
expect daysEntitled
8.6
Case 7 — N7 thirty-two is the last banded value
given monthsWorked
12
given unjustifiedAbsences
32
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
12
Case 8 — N8 above thirty-two art. 130 supplies no band at all
given monthsWorked
12
given unjustifiedAbsences
33
given daysPerWeek
5
given daysTaken
0
expect bandDaysCorridos
0
expect daysEntitled
0
Case 9 — N9 the right is acquired AFTER twelve months, so eleven earns nothing
given monthsWorked
11
given unjustifiedAbsences
0
given daysPerWeek
5
given daysTaken
0
expect daysCorridosEntitled
0
expect daysEntitled
0
Case 10 — N10 a six-day week gets more working days out of the same 30 corridos
given monthsWorked
12
given unjustifiedAbsences
0
given daysPerWeek
6
given daysTaken
0
expect daysEntitled
25.7
Case 11 — N11 days already taken come off the remainder
given monthsWorked
12
given unjustifiedAbsences
0
given daysPerWeek
5
given daysTaken
10
expect daysRemaining
11.4
Case 12 — N12 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.