diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-02-09 13:33:14 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-02-15 12:18:30 +0100 |
commit | 511c389d5c49188708471bcb9a1a2e5d26aadd52 (patch) | |
tree | 8f1cb676c03994f2e4eb125571488585932e0def | |
parent | 683737dcc4c818ce900a250f1c77993d0f48c7b1 (diff) | |
download | server-511c389d5c49188708471bcb9a1a2e5d26aadd52.tar.gz |
Round 'weeks ago' down instead of up.
-rw-r--r-- | server.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |