From b1c5ddb211994f62ab179c459ae5291f8416b706 Mon Sep 17 00:00:00 2001 From: LJNeon <23249107+LJNeon@users.noreply.github.com> Date: Fri, 23 Sep 2022 07:59:50 -0700 Subject: [PATCH] chore(ns.tFormat): Remove incorrectly placed 's' --- src/utils/StringHelperFunctions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/StringHelperFunctions.ts b/src/utils/StringHelperFunctions.ts index 47f0db0e5..eecf5db15 100644 --- a/src/utils/StringHelperFunctions.ts +++ b/src/utils/StringHelperFunctions.ts @@ -38,15 +38,15 @@ function convertTimeMsToTimeElapsedString(time: number, showMilli = false): stri let res = ""; if (days > 0) { - res += `${days} days `; + res += `${days} day${days === 1 ? "" : "s"} `; } if (hours > 0 || (Settings.ShowMiddleNullTimeUnit && res != "")) { - res += `${hours} hours `; + res += `${hours} hour${hours === 1 ? "" : "s"} `; } if (minutes > 0 || (Settings.ShowMiddleNullTimeUnit && res != "")) { - res += `${minutes} minutes `; + res += `${minutes} minute${minutes === 1 ? "" : "s"} `; } - res += `${seconds} seconds`; + res += `${seconds} second${!showMilli && secTruncMinutes === 1 ? "" : "s"}`; return res; }