From 97858b6eab05ae6701bb715ce1f276e112dee32a Mon Sep 17 00:00:00 2001 From: tobspr Date: Sun, 28 Jun 2020 10:49:26 +0200 Subject: [PATCH] Fix time formatting, again --- src/js/core/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/core/utils.js b/src/js/core/utils.js index f1da316a..8f5a1dc6 100644 --- a/src/js/core/utils.js +++ b/src/js/core/utils.js @@ -880,22 +880,22 @@ export function formatSecondsToTimeAgo(secs) { const days = Math.floor(hours / 24); if (seconds < 60) { - if (seconds <= 1) { + if (seconds === 1) { return T.global.time.oneSecondAgo; } return T.global.time.xSecondsAgo.replace("", "" + seconds); } else if (minutes < 60) { - if (minutes <= 1) { + if (minutes === 1) { return T.global.time.oneMinuteAgo; } return T.global.time.xMinutesAgo.replace("", "" + minutes); } else if (hours < 24) { - if (hours <= 1) { + if (hours === 1) { return T.global.time.oneHourAgo; } return T.global.time.xHoursAgo.replace("", "" + hours); } else { - if (days <= 1) { + if (days === 1) { return T.global.time.oneDayAgo; } return T.global.time.xDaysAgo.replace("", "" + days);