Update ex4

This commit is contained in:
LSvekis
2021-06-29 21:11:37 -04:00
committed by GitHub
parent 6bee6bbbdf
commit 2ca7ffbc3e
+3 -3
View File
@@ -9,10 +9,10 @@
} }
function countdown() { function countdown() {
const total = Date.parse(endDate) - 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);
const days = Math.floor(total / (1000 * 60 * 60 * 24)); const days = Math.floor(total / (1000 * 60 * 60 * 24));
const hours = Math.floor((total / (1000 * 60 * 60)) % 24);
const minutes = Math.floor((total / 1000 / 60) % 60);
const seconds = Math.floor((total / 1000) % 60);
return { return {
total, total,
days, days,