Browse Source

feat(nc-gui): new dayjs plugin

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
e14f404d09
  1. 2
      packages/nc-gui/plugins/a.dayjs.ts

2
packages/nc-gui/plugins/a.dayjs.ts

@ -8,6 +8,7 @@ import timezone from 'dayjs/plugin/timezone.js'
import updateLocale from 'dayjs/plugin/updateLocale' import updateLocale from 'dayjs/plugin/updateLocale'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore' import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter' import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
import isBetween from 'dayjs/plugin/isBetween'
import { defineNuxtPlugin } from '#imports' import { defineNuxtPlugin } from '#imports'
export default defineNuxtPlugin(() => { export default defineNuxtPlugin(() => {
@ -20,6 +21,7 @@ export default defineNuxtPlugin(() => {
extend(updateLocale) extend(updateLocale)
extend(isSameOrBefore) extend(isSameOrBefore)
extend(isSameOrAfter) extend(isSameOrAfter)
extend(isBetween)
dayjs.updateLocale('en', { dayjs.updateLocale('en', {
weekStart: 1, weekStart: 1,
}) })

Loading…
Cancel
Save