(function() {
var date = new Date();
if ( (date.getHours() >= 17 && date.getMinutes() >= 00) || (date.getHours() <= 20 && date.getMinutes() <= 30) ) {
var timer = setInterval(function() {
$('.output').html( date.toLocaleTimeString() );
}, 1000);
} else {
clearInterval(timer);
}
})();
Something I'm confused. How to make a specific time displays the current time?