Merge pull request #4141 from LJNeon/tformat-fix

API: Remove incorrectly placed 's' in ns.tFormat()
This commit is contained in:
hydroflame 2022-09-23 12:30:18 -03:00 committed by GitHub
commit 1b329df398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,15 +38,15 @@ function convertTimeMsToTimeElapsedString(time: number, showMilli = false): stri
let res = ""; let res = "";
if (days > 0) { if (days > 0) {
res += `${days} days `; res += `${days} day${days === 1 ? "" : "s"} `;
} }
if (hours > 0 || (Settings.ShowMiddleNullTimeUnit && res != "")) { if (hours > 0 || (Settings.ShowMiddleNullTimeUnit && res != "")) {
res += `${hours} hours `; res += `${hours} hour${hours === 1 ? "" : "s"} `;
} }
if (minutes > 0 || (Settings.ShowMiddleNullTimeUnit && res != "")) { 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; return res;
} }