Added Dayjs Plugin
This commit is contained in:
14
plugins/dayjs.ts
Normal file
14
plugins/dayjs.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import dayjs from 'dayjs'
|
||||
import duration from 'dayjs/plugin/duration'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
import localizedFormat from 'dayjs/plugin/localizedFormat'
|
||||
import 'dayjs/locale/de'
|
||||
|
||||
dayjs.extend(duration)
|
||||
dayjs.extend(relativeTime)
|
||||
dayjs.extend(localizedFormat)
|
||||
dayjs.locale('de')
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
return { provide: { dayjs } }
|
||||
})
|
||||
Reference in New Issue
Block a user