diff options
| author | Fuwn <[email protected]> | 2024-02-07 08:21:33 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-07 08:21:33 -0800 |
| commit | 389c888dfb41522ead62508cf174650b11a21cfa (patch) | |
| tree | b29dd7f922256b130e00bc65dc1e1743e13e6afd /src/lib/Media | |
| parent | feat(locale): localise hololive date formatter (diff) | |
| download | due.moe-389c888dfb41522ead62508cf174650b11a21cfa.tar.xz due.moe-389c888dfb41522ead62508cf174650b11a21cfa.zip | |
feat(locale): localise airing time
Diffstat (limited to 'src/lib/Media')
| -rw-r--r-- | src/lib/Media/Anime/Airing/AiringTime.svelte | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/lib/Media/Anime/Airing/AiringTime.svelte b/src/lib/Media/Anime/Airing/AiringTime.svelte index 5a17a1e7..9a9a1726 100644 --- a/src/lib/Media/Anime/Airing/AiringTime.svelte +++ b/src/lib/Media/Anime/Airing/AiringTime.svelte @@ -6,6 +6,7 @@ import type { MediaPrequel } from '$lib/AniList/prequels'; import { injectAiringTime } from './Subtitled/match'; import tooltip from '$lib/Tooltip/tooltip'; + import locale from '$stores/locale'; export let originalAnime: Media; export let subsPlease: SubsPlease | null; @@ -106,15 +107,7 @@ } opacity = Math.max(50, 100 - (untilAiring / 60 / 60 / 24 / 7) * 50); - dateString = - new Date(airingAt ? airingAt * 1000 : 0).toLocaleDateString([], { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }) + - ' ' + - time; + dateString = $locale().dateFormatter(new Date(airingAt ? airingAt * 1000 : 0)); } }; |