mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
perform test
test to courses Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -103,9 +103,9 @@ function formatDuration(seconds) {
|
||||
const s = seconds % 60;
|
||||
|
||||
const parts = [];
|
||||
if (h) parts.push(`${h} hr`);
|
||||
if (m) parts.push(`${m} min${m !== 1 ? "s" : ""}`);
|
||||
if (!h && !m && s) parts.push(`${s} sec${s !== 1 ? "s" : ""}`);
|
||||
if (h) parts.push(`${h} hour${h !== 1 ? "s" : ""}`);
|
||||
if (m) parts.push(`${m} minute${m !== 1 ? "s" : ""}`);
|
||||
if (!h && !m && s) parts.push(`${s} second${s !== 1 ? "s" : ""}`);
|
||||
return parts.join(" ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user