Israeli labor law grants workers an additional bonus on top of their regular pay when they work during evening or night hours. Shiftly models these as two additive segments — a 20% evening bonus and a 50% night bonus — that overlay the regular pay timeline rather than replacing it. A worker who logs hours in the evening receives both their regular rate (100%/125%/150%) and the 20% bonus simultaneously.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dmaman86/shiftly/llms.txt
Use this file to discover all available pages before exploring further.
Bonus Brackets at a Glance
| Bonus | Key | Time Window | Additive Rate |
|---|---|---|---|
| Night | hours50 | 00:00 – 06:00 | +50% |
| Evening | hours20 | 14:00 – 22:00 | +20% |
| Night | hours50 | 22:00 – 24:00 | +50% |
The 22:00–24:00 window and the 00:00–06:00 window both map to the same
hours50 key. Hours in either window are summed into the same Segment, giving a single combined total for all night-bonus hours in a day.Type Definitions
How Segments Are Labeled: ShiftSegmentResolver
Before ExtraCalculator ever runs, the ShiftSegmentResolver slices the shift’s Point (start/end in minutes from midnight) against a day-type-specific segment map. For a Regular day, the relevant bonus windows in the map are:
LabeledSegmentRange objects:
ExtraCalculator
ExtraCalculator receives the complete LabeledSegmentRange[] list from ShiftSegmentResolver and filters by key, converting minute-ranges to fractional hours:
sum helper:
- Filters
labeledSegmentsto only those matching the targetkey. - Sums
(end − start) / 60across all matching segments to convert minutes to hours. - This naturally merges both
hours50windows (00:00–06:00 and 22:00–24:00) into one total.
Additive Nature of Bonuses
The evening and night bonuses are additive, meaning they are added on top of whatever regular-rate bracket the hours fall into. They are never a replacement rate.| Time window | Regular bracket | Bonus | Effective rate |
|---|---|---|---|
| 21:00–22:00 | 100% (within standard hours) | +20% (evening) | 120% |
| 22:00–23:00 | 100% (within standard hours) | +50% (night) | 150% |
RegularBreakdown and ExtraBreakdown are stored as separate fields in BasePayMap — the UI and the salary calculation engine combine them when rendering the final pay figure.
Accumulation Across Shifts
When multiple shifts are logged on the same day,ExtraCalculator also implements a Reducer interface to accumulate results:
Bonus Windows on Special Days
On partial special days (SpecialPartialStart — Fridays and holiday eves), the evening bonus window is shortened: it runs from 14:00 to the special-start time (17:00 or 18:00) instead of continuing to 22:00. After the special-start time, the segment map switches to shabbat150 / shabbat200 keys, which are handled by SpecialCalculator rather than ExtraCalculator.
On full special days (SpecialFull — Shabbat and paid holidays), the segment map contains only shabbat150 and shabbat200 entries. No hours20 or hours50 segments exist, so ExtraCalculator returns zero for both bonus fields.
See Special Days for the complete breakdown of Shabbat and holiday pay windows.