From 511c389d5c49188708471bcb9a1a2e5d26aadd52 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 9 Feb 2022 13:33:14 +0100 Subject: Round 'weeks ago' down instead of up. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 0766216..481fb52 100644 --- a/server.js +++ b/server.js @@ -184,7 +184,7 @@ function human_date(time) { } if (days === 1) return "Yesterday"; if (days < 14) return days + " days ago"; - if (days < 31) return Math.ceil(days / 7) + " weeks ago"; + if (days < 31) return Math.floor(days / 7) + " weeks ago"; return date.toISOString().substring(0,10); } -- cgit v1.2.3