@initred/nuxt3-dayjs
v1.0.3
Published
[dayjs](https://day.js.org/) module for [nuxt v3](https://nuxt.com/)
Downloads
13
Maintainers
Readme
Nuxt3 dayjs Module
defaults config
export default defineNuxtModule<ModuleOptions>({
defaults: {
locales: [],
defaultLocale: 'en',
plugins: [
'utc',
'timezone'
],
defaultTimezone: null
}
})
How to use
export default defineNuxtConfig({
modules: [
'@initred/nuxt3-dayjs',
],
dayjs: {
locales: ['en', 'ko'],
defaultLocale: 'ko',
defaultTimezone: 'America/New_York',
plugins: [
'relativeTime',
'isoWeek',
'utc',
'weekday',
'isToday',
'isSameOrBefore',
'isSameOrAfter',
'localizedFormat',
'timezone',
'updateLocale',
'localeData',
],
},
],
Development
- Run
npm run dev:prepare
to generate type stubs. - Use
npm run dev
to start playground in development mode.