I\'ve got a bit of code here that calculates the hours difference between two datetimes. Kind of at a loss here. Code is hit or miss and I\'m not sure why.
var
The problem is that your parseInt() on date[1] is using the leading zero.
return new Date( parseInt(date[2]), parseInt(date[0])-1, parseInt(date[1]), hm[0], parseInt(hm[1]) );
When you pass a date like 01/09/2011, the 09 is being parsed as 0, not 9.