Update ex4

This commit is contained in:
LSvekis 2021-06-29 21:10:00 -04:00 committed by GitHub
parent 5584b87f35
commit 6bee6bbbdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@
window.setTimeout(update, 1000);
}
function countdown() {
const total = Date.parse(endDate) - Date.parse(new Date());
const total = Date.parse(endDate) - new Date();
const seconds = Math.floor((total / 1000) % 60);
const minutes = Math.floor((total / 1000 / 60) % 60);
const hours = Math.floor((total / (1000 * 60 * 60)) % 24);