From http://stackoverflow.com/questions/1036742/date-difference-in-javascript-ignoring-time-of-day