function getDay(t) { return Math.floor(t / D); } if(getDay(t - lastT) >= days) setTimeout(dialog.setAttribute.bind(dialog, "open", "true"), timeout);