diff --git a/plugins/dayjs.ts b/plugins/dayjs.ts new file mode 100644 index 0000000..723c115 --- /dev/null +++ b/plugins/dayjs.ts @@ -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 } } +}) \ No newline at end of file