summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-02-09 13:33:14 +0100
committerTor Andersson <tor@ccxvii.net>2022-02-15 12:18:30 +0100
commit511c389d5c49188708471bcb9a1a2e5d26aadd52 (patch)
tree8f1cb676c03994f2e4eb125571488585932e0def
parent683737dcc4c818ce900a250f1c77993d0f48c7b1 (diff)
downloadserver-511c389d5c49188708471bcb9a1a2e5d26aadd52.tar.gz
Round 'weeks ago' down instead of up.
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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);
}