This commit is contained in:
Boof 2023-05-31 13:45:43 +02:00 committed by GitHub
parent 735f1685ea
commit 368f4fad37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,10 @@ function countdownTimer() {
}
function countdown() {
const now = new Date().getTime();
const nextYear = new Date(theDate).getTime();
const timeRemaining = nextYear - now;
const days = Math.floor(timeRemaining / (1000 * 60 * 60 * 24));
const hours = Math.floor((timeRemaining % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((timeRemaining % (1000 * 60 * 60)) / (1000 * 60));