document .querySelectorAll("time[datetime]") .forEach( (e) => (e.innerText = new Date( e.getAttribute("datetime") ).toLocaleString()) );