From 5db6e94041d6febff1c058086f85390f85b142d1 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 25 Nov 2023 23:38:26 -0800 Subject: feat(anime): always use days --- src/lib/Media/anime.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/lib/Media/anime.ts') diff --git a/src/lib/Media/anime.ts b/src/lib/Media/anime.ts index baef7e14..01bc3eeb 100644 --- a/src/lib/Media/anime.ts +++ b/src/lib/Media/anime.ts @@ -35,25 +35,25 @@ export const airingTime = (anime: Media, upcoming = false) => { if (untilAiring !== undefined) { let minutes = untilAiring / 60; - let few = true; + const few = true; if (minutes >= 30) { hours = minutes / 60; if (hours >= 24) { - let weeks = Math.floor(Math.floor(hours / 24) / 7); + // let weeks = Math.floor(Math.floor(hours / 24) / 7); - few = false; + // few = false; - if (weeks >= 1) { - weeks = Math.round(weeks); + // if (weeks >= 1) { + // weeks = Math.round(weeks); - timeFrame = `${weeks} week${weeks === 1 ? '' : 's'}`; - } else { - const days = Math.round(Math.floor(hours / 24)); + // timeFrame = `${weeks} week${weeks === 1 ? '' : 's'}`; + // } else { + const days = Math.round(Math.floor(hours / 24)); - timeFrame = `${days} day${days === 1 ? '' : 's'}`; - } + timeFrame = `${days} day${days === 1 ? '' : 's'}`; + // } } else { hours = Math.round(hours); -- cgit v1.2.3