[eluser]fergp25[/eluser]
This isn't so much a Codeigniter problem as it is a general logic problem.
I'm building a calendar to track work details. All is going fine and I'm virtually done with it. However, the customer wants me to add in a seemingly simple detail.
On each day of the week on the calendar, I need to determine if the current user is in Shift A or Shift B.
Shifts are as follows.
Beginning on 4/7/2013 Shift A will work 5 days on, 4 days off, 5 days on, 4 days off, 5 days on, 5 days off (repeats forever)
Beginning on 4/21/2013 Shift B will work 5 days on, 4 days off, 5 days on, 4 days off, 5 days on, 5 days off (repeats forever)
Same on/off schedule for both shifts, however they start on different days. I need to determine what shift will work on what day.