## Tuesday, 13 October 2015

I celebrated Ada Lovelace day by working on a difficult logic problem. If someone is on a holiday’s included shift pattern for part of the year and then moves off internally to a holidays excluded pattern, how much holiday do they have left to take?
It may sound easy but the logic was quite daunting. The shift pattern accounted for their hours and basic holiday. Then they could take additional holiday while on shift if they were entitled to more than their basic. Plus they could swap shifts and training was in addition. Oh and they also did overtime too. So all in all a very typical shift operation designed for ideal circumstances and then continually adapted to fit the changing environment.
So pro rata estimates were invalid because the shift pattern did not remain continuous for the whole year. Hence I had to take the recorded hours they had worked, then the holiday they had taken into account plus the hours they were due to be scheduled on when they moved off the shift pattern. So a lot of maths later I had a logically sound answer.
So how much holiday would you give a person who is on a 37.5 hour week, and is due to be moved off the rota on 1st December? He is entitled to 30 days of holiday plus Bank Holidays. The rota accounted for only 30 days during the year. He has worked 1580 hours (or scheduled to work including sickness) up until 1st December. Then he moves onto an office shift pattern. He has also had 37.5 hours of training and taken 24 hours of holiday in addition to the holidays included shift pattern.

Well first we need to know how many hours he will be scheduled to work on an office shift pattern. There are four weeks and three days in December. So that would be 172.5 hours.
Then we work out how many hours he should have been scheduled for during the year. 1,955.25 hours.
He has worked 1,641.5 up until 1st December.
So the holiday that was included in the rota was 1,955.25-1,641.5-172.5=141.25 hours
So he was entitled to 285 hours of holiday during the year. He has taken 24 hours and been scheduled for 141.25 hours of holiday. Therefore logically he is entitled to 119.75 hours of holiday in December. There are two Bank Holidays in December so that takes care of 15 hours of holiday (two days of 7.5-hours). But that still leaves 104.75 hours or 11 days.
That is half of December!
• Force him to take holiday before moving to the new post
• Schedule him to be off on some shifts before December
• Pay overtime
• Carry over holiday