Welcome Guest, Not a member yet? Register   Sign In
Calendar determining work shifts
#2

[eluser]micfai[/eluser]
You know the start dates so you can generate the current month's worth of schedules. We will call 5 days on, 4 days off, 5 days on, 4 days off, 5 days on, 5 days off one cycle. Each cycle is 28 days.

For instance you could take today's date and find out how many days its been since 4/7/2013. Divide that number by 28, round down to the nearest whole number and multiply by 28. take your first number and subtract the number you just got from multiplication. This will give you a number less than 28 which tells you what day in the cycle you are on.

Example: Today is 37 days past 4/7. 37/28 = 1.32. round down to 1. 28*1 = 28. 37-28 = 9. 9 is the day in the current cycle which is day 4 of the 4 days off. The next day would be 5 days on 4 days off etc.


Messages In This Thread
Calendar determining work shifts - by El Forum - 05-13-2013, 12:48 PM
Calendar determining work shifts - by El Forum - 05-14-2013, 05:14 PM
Calendar determining work shifts - by El Forum - 05-15-2013, 06:28 AM
Calendar determining work shifts - by El Forum - 05-15-2013, 08:48 AM
Calendar determining work shifts - by El Forum - 05-15-2013, 09:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB