aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Media/anime.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-11-25 23:38:26 -0800
committerFuwn <[email protected]>2023-11-25 23:38:26 -0800
commit5db6e94041d6febff1c058086f85390f85b142d1 (patch)
tree5de1b5b9b46132e6ed439ddf83f3c376df414814 /src/lib/Media/anime.ts
parentfeat(updates): change wording (diff)
downloaddue.moe-5db6e94041d6febff1c058086f85390f85b142d1.tar.xz
due.moe-5db6e94041d6febff1c058086f85390f85b142d1.zip
feat(anime): always use days
Diffstat (limited to 'src/lib/Media/anime.ts')
-rw-r--r--src/lib/Media/anime.ts20
1 files changed, 10 insertions, 10 deletions
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);