I have a countdown here which counts down to New Year's fine. But, for some reason the exact same code fails to work here when i put in a different date; it is exactly 1 month off.
Why is this happening?
Specifically, here is the code im using to get the days, hours, etc:
christmas = new Date(new Date().getFullYear(), 12, 25);
seconds = Math.floor((christmas - (new Date()))/1000);
minutes = Math.floor(seconds/60);
hours = Math.floor(minutes/60);
days = Math.floor(hours/24);
hours = hours-(days*24);
minutes = minutes-(days*24*60)-(hours*60);
seconds = seconds-(days*24*60*60)-(hours*60*60)-(minutes*60);