title: What is the best way to compare time periods and how do I structure my database for it?
body: <p>I'm looking for a way, that if my app says "Looking for person available from <strong>March 3rd, 2016 8:00 am to March 3rd, 2016 3:00 pm</strong>" to match it with a person that might be available from <strong>March 3rd, 2016 7:00 am to March 3rd, 2016 16:00 pm.</strong></p>
  
  <p>Now this is a just a snapshot, it has to scale for infinite times/dates for example a person might be available from <strong>March 3rd, 2016 7:00 am to 9:00 am, then again from 2:00pm to 8:00pm</strong>, so I'd have to have a way to filter people like this as a not complete match.</p>
  
  <p>What I have so far is ONE TABLE that holds the dates to match against, so for example March 3rd 8 - 3pm, March 4th 8 - 3pm, March 5th 8 - 3pm..etc..</p>
  
  <p>Another table that holds people and their availability as child elements, but I am not sure how to structure this part to make it easy and efficient to match inside loops with the other table.</p>
  
  <p>Right now, in my employee table I have one field "March 3rd" and then another field with hours/minutes available as an array so for example "8:00, 8:15, 8:30, 8:45, 9:00...etc... The hours increments have to be in 15 min periods, so I can't just put 8am - 5pm for example...especially if the person is available during certain periods of the day...</p>
  
  <p>Here is what my "employee select your availability looks like" </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table class="table table-bordered table-hover employe-availability-table"&gt;
      &lt;thead&gt;
      &lt;tr&gt;
          &lt;th class="warning"&gt; Hour &lt;/th&gt;
          &lt;th class="warning"&gt; 15 &lt;/th&gt;
          &lt;th class="warning"&gt; 30 &lt;/th&gt;
          &lt;th class="warning"&gt; 45 &lt;/th&gt;
          &lt;th class="warning"&gt; Hour &lt;/th&gt;
          &lt;th class="warning"&gt; 15 &lt;/th&gt;
          &lt;th class="warning"&gt; 30 &lt;/th&gt;
          &lt;th class="warning"&gt; 45 &lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td data-hour="0" data-minute="00" data-day-period="N" class="hour"&gt; 0:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="0:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="0" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="0:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="0" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="0:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="0" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="0:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="12" data-minute="00" data-day-period="J" class="hour"&gt; 12:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="12:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="12" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="12:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="12" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="12:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="12" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="12:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="1" data-minute="00" data-day-period="N" class="hour"&gt; 1:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="1:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="1" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="1:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="1" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="1:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="1" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="1:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="13" data-minute="00" data-day-period="J" class="hour"&gt; 13:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="13:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="13" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="13:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="13" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="13:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="13" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="13:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="2" data-minute="00" data-day-period="N" class="hour"&gt; 2:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="2:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="2" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="2:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="2" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="2:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="2" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="2:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="14" data-minute="00" data-day-period="J" class="hour"&gt; 14:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="14:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="14" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="14:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="14" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="14:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="14" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="14:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="3" data-minute="00" data-day-period="N" class="hour"&gt; 3:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="3:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="3" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="3:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="3" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="3:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="3" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="3:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="15" data-minute="00" data-day-period="S" class="hour"&gt; 15:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="15:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="15" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="15:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="15" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="15:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="15" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="15:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="4" data-minute="00" data-day-period="N" class="hour"&gt; 4:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="4:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="4" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="4:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="4" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="4:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="4" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="4:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="16" data-minute="00" data-day-period="S" class="hour"&gt; 16:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="16:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="16" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="16:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="16" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="16:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="16" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="16:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="5" data-minute="00" data-day-period="N" class="hour"&gt; 5:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="5:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="5" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="5:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="5" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="5:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="5" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="5:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="17" data-minute="00" data-day-period="S" class="hour"&gt; 17:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="17:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="17" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="17:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="17" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="17:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="17" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="17:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="6" data-minute="00" data-day-period="N" class="hour"&gt; 6:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="6:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="6" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="6:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="6" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="6:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="6" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="6:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="18" data-minute="00" data-day-period="S" class="hour"&gt; 18:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="18:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="18" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="18:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="18" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="18:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="18" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="18:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="7" data-minute="00" data-day-period="J" class="hour"&gt; 7:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="7:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="7" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="7:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="7" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="7:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="7" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="7:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="19" data-minute="00" data-day-period="S" class="hour"&gt; 19:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="19:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="19" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="19:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="19" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="19:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="19" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="19:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="8" data-minute="00" data-day-period="J" class="hour"&gt; 8:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="8:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="8" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="8:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="8" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="8:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="8" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="8:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="20" data-minute="00" data-day-period="S" class="hour"&gt; 20:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="20:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="20" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="20:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="20" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="20:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="20" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="20:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="9" data-minute="00" data-day-period="J" class="hour"&gt; 9:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="9:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="9" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="9:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="9" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="9:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="9" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="9:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="21" data-minute="00" data-day-period="S" class="hour"&gt; 21:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="21:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="21" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="21:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="21" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="21:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="21" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="21:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="10" data-minute="00" data-day-period="J" class="hour"&gt; 10:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="10:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="10" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="10:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="10" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="10:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="10" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="10:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="22" data-minute="00" data-day-period="S" class="hour"&gt; 22:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="22:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="22" data-minute="15" data-day-period="S"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="22:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="22" data-minute="30" data-day-period="S"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="22:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="22" data-minute="45" data-day-period="S"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="22:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td data-hour="11" data-minute="00" data-day-period="J" class="hour"&gt; 11:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="11:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="11" data-minute="15" data-day-period="J"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="11:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="11" data-minute="30" data-day-period="J"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="11:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="11" data-minute="45" data-day-period="J"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="11:45" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour="23" data-minute="00" data-day-period="N" class="hour"&gt; 23:00 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="23:00" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="23" data-minute="15" data-day-period="N"&gt; 15 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="23:15" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="23" data-minute="30" data-day-period="N"&gt; 30 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="23:30" style="display: inline-block;"&gt;&lt;/td&gt;
          &lt;td data-hour-ref="23" data-minute="45" data-day-period="N"&gt; 45 &lt;input type="checkbox" class="hide undoUniform" name="field_108890_tab_14" value="23:45" style="display: inline-block;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any nudge in the right direction regarding my logic and setup would be greatly appreciated. </p>