I'm writing a little script thats a countdown timer.
What i want to do is be able to set a length of time like 3, 5, 7 days etc.
So i will have
var dif = 3;
var now = new Date();
var end = new Date(now.getFullYear(), now.getMonth(), now.getDay() + dif);
So my question is how do I find how many seconds make up the difference between the two dates and then how do I count down from now to the end time.