Can someone tell me if I'm interpreting this properly?
I know that it is finding the current time (nowsec), then setting a date in the future (doomsday). Is it then finding the proper format for the future date (thensec), and then subtracting the future date from the present to find out the difference?
What is /1000 /60 /60 /24 doing?
Thanks!
function duedate(now){
var nowsec = now.getTime();
var doomsday=new Date(2000, 00, 01, 00, 00, 00);
var thensec = doomsday.getTime();
var ans = (thensec - nowsec) /1000 /60 /60 /24;
document.doom.daystill.value=ans;
}
I know that it is finding the current time (nowsec), then setting a date in the future (doomsday). Is it then finding the proper format for the future date (thensec), and then subtracting the future date from the present to find out the difference?
What is /1000 /60 /60 /24 doing?
Thanks!
function duedate(now){
var nowsec = now.getTime();
var doomsday=new Date(2000, 00, 01, 00, 00, 00);
var thensec = doomsday.getTime();
var ans = (thensec - nowsec) /1000 /60 /60 /24;
document.doom.daystill.value=ans;
}