progns,
такой пойдёт?
function getDaysLeft() {
var daysLeft = (new Date(2012, 01, 09) - new Date())/1000/60/60/24;
daysLeft = daysLeft>0 && daysLeft<1 ? 1 : daysLeft;
if (daysLeft < 0) {
clearInterval(timer);
alert('Time is up!');
return;
}
alert(daysLeft);
}
var timer = setInterval(getDaysLeft, 1000*60);
getDaysLeft();