title: Javascript - How to check if current time is between two different times
body: <p>I am trying programmatically check if the current time for my web application is between two predefined times. I don't know how to get the current time and then set variables that store two predefined times. The pseudo code would look like this</p>
  
  <pre><code>if(currentTime &lt; shiftStart &amp;&amp; currentTime &lt;shiftEnd)
  {
     shift = 2
  }
  </code></pre>
  
  <p>But how do I declare and setup the variables so the code works correctly. </p>