feat: show full created time in tooltip
This commit is contained in:
parent
ff81389404
commit
6c350faf7c
3 changed files with 16 additions and 5 deletions
|
@ -0,0 +1,9 @@
|
|||
import type { MaybeRef } from '@vueuse/core'
|
||||
|
||||
export const useFormattedDateTime = (
|
||||
value: MaybeRef<string | Date>,
|
||||
options: Intl.DateTimeFormatOptions = { dateStyle: 'long', timeStyle: 'medium' },
|
||||
) => {
|
||||
const formatter = Intl.DateTimeFormat(undefined, options)
|
||||
return computed(() => formatter.format(new Date(resolveUnref(value))))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue