title: Recurring work weeks
body: <p>I am working on a web tool where the user can see who works certain dates.</p>
  
  <p>Have a look at this picture of an example schedule.</p>
  
  <p><a href="https://i.stack.imgur.com/gCCpM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gCCpM.jpg" alt="example schedule"></a></p>
  
  <p>Let's say that this planned schedule starts Week 1 2017. <strong>Monday in week 1</strong> we can read from the table that <strong>employee 1 and 2 works 0800-1500</strong> and <strong>emplyee 3 and 4 works 1900-2300</strong>. <strong>Employee 5 and 6 have the day off</strong>. Next week they all skip down one line.</p>
  
  <p>We can read that <strong>Monday in week 2, employee 1 and 2 works 1900-2300, employee 3 and 4 have the day off, employee 5 and 6 works 0800-1500.</strong></p>
  
  <p>I hope this gives a clear concept of how this table works, cause here comes my question:</p>
  
  <p>How would the best practice be to script this so that the user can look up any date and see who is working. The schedule changes two-three times a year; should this info be saved in a database or maybe a xml-file?</p>
  
  <p>Since the schedule is repeated every third week my thought was to script it so that when the user looks up a certain date, javascript checks how many times the roster has been repeated (as integer) and then uses the modulo to create a "offset". So if employee 1 asks for Monday in week 10 (3x3)+1=10. The +1 is used as the offset to show who is actually working.</p>
  
  <p>I'm quite new to programming/scripting in general, does anybody have any suggestions to what technique to use for this issue?</p>
  
  <p>I plan to use html 5, css, javascript, php and sql.</p>