title: calculate business days including holidays
body: <p>i need to calculate the business days between two dates.
  ex : we have holiday(in USA) on july4th. so if my dates are
  date1 = 07/03/2012
  date2 = 07/06/2012</p>
  
  <p>no of business days b/w these dates should be 1 since july4th is holiday.</p>
  
  <p>i have a below method to calclulate the business days which will only counts week ends but not holidays.
  is there any way to calculate holidays also....please help me on this.</p>
  
  <pre><code>  public static int getWorkingDaysBetweenTwoDates(Date startDate, Date endDate) {  
      Calendar startCal;  
      Calendar endCal;  
      startCal = Calendar.getInstance();  
      startCal.setTime(startDate);  
      endCal = Calendar.getInstance();  
      endCal.setTime(endDate);  
      int workDays = 0;  
  
      //Return 0 if start and end are the same  
      if (startCal.getTimeInMillis() == endCal.getTimeInMillis()) {  
          return 0;  
      }  
  
      if (startCal.getTimeInMillis() &gt; endCal.getTimeInMillis()) {  
          startCal.setTime(endDate);  
          endCal.setTime(startDate);  
      }  
  
      do {  
          startCal.add(Calendar.DAY_OF_MONTH, 1);  
          if (startCal.get(Calendar.DAY_OF_WEEK) != Calendar.SATURDAY   
         &amp;&amp; startCal.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) {  
              ++workDays;  
          }  
      } while (startCal.getTimeInMillis() &lt; endCal.getTimeInMillis());  
  
      return workDays;  
  }
  </code></pre>