Better way to determine date I am looking for best practice on how I may write this function more efficiently.  

  var d = new Date(),
      time = d.getHours(),
      day  = d.getDay();

  if (day &gt; 0 || day &lt; 7){
    if (time &gt; 18 || time &lt; 8){
      // execute code

    }    
  }
if ( (day &gt; 0 || day &lt; 7) &amp;&amp; (t &gt; 18 || t &lt; 8))


Is this what you want?

Second condition will only be evaluated only if the first one is true. If the first one is true, then only the second one is evaluated.