← Back to context

Comment by 6510

5 hours ago

Tax I could do to some extend but I once (for laughs) had a go at scripting up Dutch work hour laws because no one could do it in their head. This was so terrifyingly complex that I'm convinced many laws should be rewritten to make it easier to code.

The problem looks something like (not a real example): Type Z hours maximum A per day, B per week, C per month, D per year. E more hours than A is allowed every F weeks but no more than G per month and H per year. More than B is allowed... etc Minimum rest hours I per day, J per week, K per two weeks, L per month. More is allowed every 7.5 days unless it is full moon and maximum hours per day were exceeded at least 3 times in the last 82 days except from solar eclipses or if the Kings is married 12.5 years or if the employee gave birth in the last 472 hours.

My employer has software to make the schedules. It cant tell where shifting around shifts is possible but you can try do it and it will tell you why it isn't possible.

I was hoping to calculate if multiple shifts can be shifted around to facilitate someones day off. Sometimes it just cant be made to work but if people are willing and there is a hole you end up doing it anyway. (I've done a triple shift once because the coworker wanted to bring his wife to the hospital.) Employees earn undocumented days off... and then you end up with multiple schedules, the real one and the official one. Possibly extra copies depending on who knows what is really going on. This cant be the way...

Better just have modern laws that make sense in code.