diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2023-01-01 17:11:33 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-01 17:11:33 +0900 |
| commit | c3a36698e5e57418d791c2a77f7fdda284b76e5d (patch) | |
| tree | 780229acf8bb328c94eb9a56a89982f64a54eadc /packages/frontend/src/components/global/MkTime.vue | |
| parent | 13.0.0-beta.13 (diff) | |
| download | misskey-c3a36698e5e57418d791c2a77f7fdda284b76e5d.tar.gz misskey-c3a36698e5e57418d791c2a77f7fdda284b76e5d.tar.bz2 misskey-c3a36698e5e57418d791c2a77f7fdda284b76e5d.zip | |
use Intl.DateTimeFormat and Intl.NumberFormat instead of toLocaleString (#9444)
Diffstat (limited to 'packages/frontend/src/components/global/MkTime.vue')
| -rw-r--r-- | packages/frontend/src/components/global/MkTime.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue index f72b153f56..0bbb0f5399 100644 --- a/packages/frontend/src/components/global/MkTime.vue +++ b/packages/frontend/src/components/global/MkTime.vue @@ -9,6 +9,7 @@ <script lang="ts" setup> import { onUnmounted } from 'vue'; import { i18n } from '@/i18n'; +import { dateTimeFormat } from '@/scripts/intl-const'; const props = withDefaults(defineProps<{ time: Date | string; @@ -18,7 +19,7 @@ const props = withDefaults(defineProps<{ }); const _time = typeof props.time === 'string' ? new Date(props.time) : props.time; -const absolute = _time.toLocaleString(); +const absolute = dateTimeFormat.format(_time); let now = $shallowRef(new Date()); const relative = $computed(() => { |