From 1407a61f7a055e5ab1f441e6c2648f05a165bf56 Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 19 Jan 2023 09:10:03 +0100 Subject: [PATCH] remove unused functions --- interface/src/utils/time.ts | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/interface/src/utils/time.ts b/interface/src/utils/time.ts index f550e228f..d6977cccc 100644 --- a/interface/src/utils/time.ts +++ b/interface/src/utils/time.ts @@ -16,23 +16,23 @@ export const formatLocalDateTime = (date: Date) => { return new Date(date.getTime() - date.getTimezoneOffset() * 60000).toISOString().slice(0, -1).substr(0, 19); }; -export const pluralize = (count: number, noun: string) => - `${Intl.NumberFormat().format(count)} ${noun}${count !== 1 ? 's' : ''}`; +// export const pluralize = (count: number, noun: string) => +// `${Intl.NumberFormat().format(count)} ${noun}${count !== 1 ? 's' : ''}`; -export const formatDurationSec = (duration_sec: number) => { - if (duration_sec === 0) { - return ' '; - } - const roundTowardsZero = duration_sec > 0 ? Math.floor : Math.ceil; - return ( - ', ' + - roundTowardsZero(duration_sec / 86400) + - 'd ' + - (roundTowardsZero(duration_sec / 3600) % 24) + - 'h ' + - (roundTowardsZero(duration_sec / 60) % 60) + - 'm ' + - (roundTowardsZero(duration_sec) % 60) + - 's' - ); -}; +// export const formatDurationSec = (duration_sec: number) => { +// if (duration_sec === 0) { +// return ' '; +// } +// const roundTowardsZero = duration_sec > 0 ? Math.floor : Math.ceil; +// return ( +// ', ' + +// roundTowardsZero(duration_sec / 86400) + +// 'd ' + +// (roundTowardsZero(duration_sec / 3600) % 24) + +// 'h ' + +// (roundTowardsZero(duration_sec / 60) % 60) + +// 'm ' + +// (roundTowardsZero(duration_sec) % 60) + +// 's' +// ); +// };