diff options
author | tdro <tdro@noreply.example.com> | 2024-11-26 00:00:00 +0000 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2024-11-26 00:00:00 +0000 |
commit | 6ce5b716ad023059c87ba378dd236e353f78a7cc (patch) | |
tree | bbbc726a77eaf17a387a30183c5905c6882c81f7 | |
parent | 0f7b85cf557dd12316b563302accaf4905beedfb (diff) | |
download | canory-master.tar.gz canory-master.tar.bz2 canory-master.zip |
-rw-r--r-- | assets/js/index.js | 2 | ||||
-rw-r--r-- | static/js/timeago.ts | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/assets/js/index.js b/assets/js/index.js index 949aae5..01f30ef 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -960,7 +960,7 @@ if (hours <= 48) { return element.textContent = tiny(relative.format(-1 * hours, "hour"), 1); } - if (days <= 7) { + if (days <= 3) { return element.textContent = tiny(relative.format(-1 * days, "day"), 1); } } diff --git a/static/js/timeago.ts b/static/js/timeago.ts index 7c1973d..3e82d58 100644 --- a/static/js/timeago.ts +++ b/static/js/timeago.ts @@ -59,13 +59,13 @@ if (past) { if (seconds <= 60) { return element.textContent = tiny(relative.format(-1 * seconds, "second",), 1); } if (minutes <= 120) { return element.textContent = tiny(relative.format(-1 * minutes, "minute",), 1); } - if (hours <= 48) { return element.textContent = tiny(relative.format(-1 * hours, "hour",), 1); } - if (days <= 7) { return element.textContent = tiny(relative.format(-1 * days, "day",), 1); } + if (hours <= 48) { return element.textContent = tiny(relative.format(-1 * hours, "hour",), 1); } + if (days <= 3) { return element.textContent = tiny(relative.format(-1 * days, "day",), 1); } } if (future) { - if (-1 * days >= 4) { return element.textContent = tiny(relative.format(-1 * days, "day",), 2); } - if (-1 * hours >= 3) { return element.textContent = tiny(relative.format(-1 * hours, "hour",), 2); } + if (-1 * days >= 4) { return element.textContent = tiny(relative.format(-1 * days, "day",), 2); } + if (-1 * hours >= 3) { return element.textContent = tiny(relative.format(-1 * hours, "hour",), 2); } if (-1 * minutes >= 2) { return element.textContent = tiny(relative.format(-1 * minutes, "minute",), 2); } if (-1 * seconds >= 1) { return element.textContent = tiny(relative.format(-1 * seconds, "second",), 2); } } |