title: Opening hours - DIV depends on the day of the week and the hour
body: <p>I have a script that shows different div depending on the day of the week and the time of day. He works well. I need to modify it. I want to set different opening hours each day. How can I do this? Please help.</p>
  
  <p>Example</p>
  
  <p>Monday open from 8:00 to 16:00<br>
  Tuesday open from 8:00 to 16:00<br>
  Wednesday open from 8:00 to 18:00<br>
  Thursday open from 8:00 to 18:00<br>
  Friday open from 8:00 to 16:00<br>
  Saturday close<br>
  Sunday open from 8:00 to 13:00</p>
  
  <p>My script:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var d = new Date();
  var dayOfWeek = d.getDay();
  var hour = d.getHours();
  var mins = d.getMinutes();
  var status = 'open';
  
  if (dayOfWeek !== 6 &amp;&amp; dayOfWeek !== 0 &amp;&amp; hour &gt;= 9 &amp;&amp; hour &lt;= 15){
      if (hour=='9' &amp;&amp; mins &lt; '00'){
          status = 'closed';
      }else if (hour=='15' &amp;&amp; mins &gt; '30'){
          status = 'closed';
      }else{
          status = 'open';
      }
  }else{
      status = 'closed';
  }
  
  if (status=='open') {
      $('.hours').show();
      $('.closed').hide();
  }else{
      $('.hours').hide();
      $('.closed').show();
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="hours"&gt;We are OPEN&lt;/div&gt;
  &lt;div class="closed"&gt;We are CLOSED&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>