From 4f3aa2753e1af8b7369e5e7f569bde6544b05585 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 2 Jan 2024 20:37:49 -0800 Subject: [PATCH] countdown: accurately count down to dates that are more than 24 days in the future. weird --- views/countdown.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/countdown.html b/views/countdown.html index 6057ca7..6b7efdf 100644 --- a/views/countdown.html +++ b/views/countdown.html @@ -71,7 +71,7 @@ var seconds = diff % 60; var minutes = Math.floor((diff % 3600) / 60); var hours = Math.floor((diff % 86400) / 3600); - var days = Math.floor((diff % 2073600) / 86400); + var days = Math.floor(diff / 86400); var text = ""; if (!passed && diff < 3600) {