Update ex4
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
window.setTimeout(update, 1000);
|
window.setTimeout(update, 1000);
|
||||||
}
|
}
|
||||||
function countdown() {
|
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 seconds = Math.floor((total / 1000) % 60);
|
||||||
const minutes = Math.floor((total / 1000 / 60) % 60);
|
const minutes = Math.floor((total / 1000 / 60) % 60);
|
||||||
const hours = Math.floor((total / (1000 * 60 * 60)) % 24);
|
const hours = Math.floor((total / (1000 * 60 * 60)) % 24);
|
||||||
|
|||||||
Reference in New Issue
Block a user