diff options
| author | Fuwn <[email protected]> | 2023-12-13 04:42:21 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-13 04:42:21 -0800 |
| commit | 9eeef869a6c900f3aa39339f6cdd74591689d320 (patch) | |
| tree | 399c30ced5f73b4c35dfe909e8c175808c54e410 /src/lib | |
| parent | style(anime): simplify expressions (diff) | |
| download | due.moe-9eeef869a6c900f3aa39339f6cdd74591689d320.tar.xz due.moe-9eeef869a6c900f3aa39339f6cdd74591689d320.zip | |
feat(anime): 24-hour time format
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/Media/anime.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Media/anime.ts b/src/lib/Media/anime.ts index 354321db..937e9dac 100644 --- a/src/lib/Media/anime.ts +++ b/src/lib/Media/anime.ts @@ -3,6 +3,7 @@ import anime from '../../stores/anime'; import { mediaListCollection, type Media, Type } from '../AniList/media'; import lastPruneTimes from '../../stores/lastPruneTimes'; import type { AniListAuthorisation, UserIdentity } from '../AniList/identity'; +import settings from '../../stores/settings'; export const cleanCache = (user: AniListAuthorisation, identity: UserIdentity) => mediaListCollection(user, identity, Type.Anime, get(anime), get(lastPruneTimes).anime, true); @@ -19,6 +20,7 @@ export const airingTime = (anime: Media, upcoming = false) => { const untilAiring = airingAt ? Math.round((airingAt - Date.now() / 1000) * 100) / 100 : undefined; let timeFrame; const time = new Date(airingAt ? airingAt * 1000 : 0).toLocaleTimeString([], { + hour12: !settings.get().display24HourTime, hour: 'numeric', minute: '2-digit' }); |