timer
gotta keep track of how long my breaks are lol
timer
const oldDate = Date.parse("4/10/2020, 12:00:00");
const timeBetweenDates = (date1, date2) => {
const date = new Date(date1 - date2);
return {
years: date.getYear() - 70,
months: date.getMonth(),
days: date.getDay(),
hours: date.getHours(),
minutes: date.getMinutes(),
seconds: date.getSeconds(),
}
}
const pre = document.getElementById("display");
setInterval(() => {
pre.textContent = JSON.stringify(timeBetweenDates(Date.now(), oldDate), 0, 2);
}, 1000);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us