Sitemap
the next working day in a context of variable weeks (odd, even, every third etc.)

Member-only story

The next working day in

Compensation days part III for Belgian employees

7 min readJan 14, 2025

--

As I explained last summer and in my previous blog post, the compensation hours are linked to the number of hours worked on the next working day following the weekend holiday.

For example, if an employee normally works Wednesday, Thursday, and Friday, with Wednesday being a half-day, their weekend holiday compensation would be based on that half-day Wednesday schedule. This means they’d receive half a day of compensation instead of a full day.

To further complicate matters, we need to factor in those complex work schedules based on the modulo operator magic we discussed earlier. If someone works every second or third week, this needs to be reflected in the compensation calculation.

It took me some time to understand how to adjust the code snippet I already created last summer and you find below.

the code snippet we have to update

To understand how this works, I recommend reading this blog post, which provides a step-by-step explanation. It might seem complex at first glance, but the examples in the post will clarify the logic. You’ll also learn why we use the “Saturday” logic at…

--

--

Christiaan Huizer
Christiaan Huizer

Written by Christiaan Huizer

Until March 2025 I wrote once a week about how to Coda . You find blogs for beginners and experienced makers. Welcome!

No responses yet