title: Calculating working hours between two dates
body: <p>I need a PHP method for calculating working hours between two dates based on a 8 hour working day and excluding weekends and bank holidays.</p>
  
  <p>For example the difference between <code>2012-01-01T08:30:00</code> AND <code>2012-01-05T10:30:00</code> in working hours is actually 26 working hours because the first two days are weekend/bank holiday which just leaves 3 working days and the time differnce of 2 hours i.e. <code>3*8+2=26</code>.</p>
  
  <p>I have used @flamingLogos <a href="https://stackoverflow.com/questions/336127/calculate-business-days">excellent answer to a previous question</a> but cannot get it to take into account the time as well as date.</p>