function time(timeend,id) {
today = new Date();
today = Math.floor((timeend-today)/1000);
tsec=today%60; today=Math.floor(today/60); if(tsec<10)tsec='0'+tsec;
tmin=today%60; today=Math.floor(today/60); if(tmin<10)tmin='0'+tmin;
thour=today%24; today=Math.floor(today/24);
timestr=today +" d "+ thour+" h "+tmin+" m "+tsec+" sec";
document.getElementById(id).innerHTML=timestr;
window.setTimeout(time,1000,timeend,id);
}
time(new Date(2023, 4, 1, 1, 1),'t');
time(new Date(2025, 7, 1, 1, 1),'r');