20 lines
637 B
TypeScript
20 lines
637 B
TypeScript
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'
|
|
import quarterOfYear from 'dayjs/plugin/quarterOfYear'
|
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
|
|
|
dayjs.extend(duration)
|
|
dayjs.extend(relativeTime)
|
|
dayjs.extend(localizedFormat)
|
|
dayjs.extend(quarterOfYear)
|
|
dayjs.extend(isSameOrAfter)
|
|
dayjs.extend(isSameOrBefore)
|
|
dayjs.locale('de')
|
|
|
|
export default defineNuxtPlugin(() => {
|
|
return { provide: { dayjs } }
|
|
}) |