Good morning, Does anyone know how to amend this countdown code so that it always outputs at double digits, i.e. 01 01 01, rather than 1 1 1
<script>
$(document).ready(function () {
setInterval(function () {
var now = new Date();
var day = now.getDay();
var end;
if(day >= 1 && day <= 5) {
end = new Date(now.getYear(), now.getMonth(), day, 14, 0, 0, 0);
} else {
end = new Date(now.getYear(), now.getMonth(), day, 13, 0, 0, 0);
}
var timeleft = end.getTime() - now.getTime();
ar diff = new Date(timeleft);
$("#countdownTimer").html(diff.getHours() + " " + diff.getMinutes() + " " + diff.getSeconds());
}, 1000);
});
</script>
Thank you guys