Coundtown help
Trying to wrap my head around the math for a countdown timer. I have to separate the days, hours, minutes, and seconds... so really I'll have 4 countdowns on the same page. Here is what I have so far, the date I'm counting down to is March 12, 2011, 12PM. The daysLeft works, but I don't know what to do for the others.
//Calendar
toDay = new Date();
fcdDate = new Date(2011, 3, 12, 12);
cdDate = fcdDate-toDay;
daysLeft = Math.floor(cdDate/86400000);
hoursLeft = Math.floor(cdDate/?);
minsLeft = Math.floor(cdDate/?);
secsLeft = Math.floor(cdDate/?);
*** daysLeft, hoursLeft, etc refers to a value I’m linking with dynamic text representing each of those respectively. I’m not sure what the 86400000 is. Also, the fcdDate has to be set with a month behind for some reason (year, month-1, date, hour).
Thanks in advance