Q:

Outputs the wrong number of days

Trying to get the days till the event between now and then.., outputs the wrong number of  days
   var oneDay = 24*60*60*1000;
   var date = new Date().getTime();
   var finish = new Date(2015, 7, 8, 12, 0, 0, 0).getTime();

   var daysleft = ((finish-date)/(oneDay));

the output is 89 days, thou its like 59 till the Jul,8

A:

January is month 0, not 1 - that is, the second arg to your new Date call isn't generating a July date, but an August date.  To verify it, try putting new Date(2015, 7, 8, 12, 0, 0, 0) into your javascript console - you'll see August 8th.

