refactor(account): improve joined time format
This commit is contained in:
parent
1194d56d09
commit
b656c6fda2
2 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
import type { MaybeRef, UseTimeAgoOptions } from '@vueuse/core'
|
||||
import type { MaybeComputedRef, UseTimeAgoOptions } from '@vueuse/core'
|
||||
|
||||
export const useFormattedDateTime = (
|
||||
value: MaybeRef<string | Date | undefined>,
|
||||
value: MaybeComputedRef<string | Date | undefined>,
|
||||
options: Intl.DateTimeFormatOptions = { dateStyle: 'long', timeStyle: 'medium' },
|
||||
) => {
|
||||
const formatter = Intl.DateTimeFormat(undefined, options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue