An error has occurred
{{terminalError}}
let second = 1000;
let minute = second * 60;
let hour = minute * 60;
let day = hour * 24;
let timer;
const deadline = new Date('11/27/2023 10:00:00').getTime();
let interval = setInterval(function(){
const now = new Date().getTime();
let distance = deadline - now;
if (distance < 0) {
clearInterval(timer);
document.getElementById('elementos-contador').innerHTML= 'Lo sentimos, la oferta ya no está disponible';
return;
}
let days = Math.floor(distance / day);
let hours = Math.floor((distance % day) / hour);
let minutes = Math.floor((distance % hour) / minute);
let seconds = Math.floor((distance % minute) / second);
document.getElementById('dias').innerHTML = ('0' + days).slice(-2);
document.getElementById('horas').innerHTML = ('0' + hours).slice(-2);
document.getElementById('minutos').innerHTML = ('0' + minutes).slice(-2);
document.getElementById('segundos').innerHTML = ('0' + seconds).slice(-2);
}, 1000);