mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-22 01:15:25 +03:00
fix: update date format when switching language
This commit is contained in:
parent
e3ab850cc1
commit
0c069e4809
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ export const useFormattedDateTime = (
|
|||
options: Intl.DateTimeFormatOptions = { dateStyle: 'long', timeStyle: 'medium' },
|
||||
) => {
|
||||
const { locale } = useI18n()
|
||||
const formatter = Intl.DateTimeFormat(locale.value, options)
|
||||
const formatter = $computed(() => Intl.DateTimeFormat(locale.value, options))
|
||||
return computed(() => {
|
||||
const v = resolveUnref(value)
|
||||
return v ? formatter.format(new Date(v)) : ''
|
||||
|
|
Loading…
Reference in a new issue