title: Calculating the number of holidays between a date range in jquery
body: <p>how to exclude holidays from total days ?</p>
  
  <p>how to get the number of public holidays as per US calender ?   </p>
  
  <pre><code>&lt;script&gt;
      function labourcostcalc() {
          var date1 = $('#CostMaster_labour_allocationdate').val();
          var date2 = $('#CostMaster_labour_deallocationdate').val();
          var diff;
          if (date1 &gt;= date2) {
              diff = new Date(Date.parse(date1) - Date.parse(date2));
          } else if (date1 &lt; date2) {
              diff = new Date(Date.parse(date2) - Date.parse(date1));
          }
          alert('Diff  date ' + diff);
          var days = diff / 1000 / 60 / 60 / 24;
          alert(days);
      }
  &lt;/script&gt;
  </code></pre>