function updateTimer(){
    future = Date.parse("feb 22, 2022 14:00:00");
    now = new Date();
    diff = future - now;

    days = Math.floor(diff / (1000 * 60 * 60 * 24));
    hours = Math.floor(diff / (1000 * 60 * 60));
    mins = Math.floor(diff / (1000 * 60));
    secs = Math.floor(diff / 1000);

    d = days;
    h = hours - days * 24;
    m = mins - hours * 60;
    s = secs - mins * 60;

    d_sz = " " + d;    
    h_sz = " " + h;    
    m_sz = " " + m;    
    s_sz = " " + s;    

    document.getElementById("nap").innerHTML = 
        '<div>' + d_sz + '<span> Nap </span></div> ';
    
    document.getElementById("ora").innerHTML = 
        '<div>' + h_sz + '<span> Ora </span></div> ';

    document.getElementById("perc").innerHTML = 
        '<div>' + m_sz + '<span> Perc </span></div> ';

    document.getElementById("mperc").innerHTML = 
        '<div>' + s_sz + '<span> Masodperc </span></div>';
}
setInterval('updateTimer()', 1000);