nuxt-community / Dayjs Module
Licence: mit
Official Day.js module for your Nuxt.js project.
Stars: ✭ 111
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Dayjs Module
Nuxt User Agent
Nuxt.js module for handling User-Agent.
Stars: ✭ 102 (-8.11%)
Mutual labels: nuxt, nuxtjs
Nuxt Tailwind
A Nuxt.js starter project template using Tailwind CSS without the distraction of a complicated development environment.
Stars: ✭ 71 (-36.04%)
Mutual labels: nuxt, nuxtjs
Laravel Vuejs.com
Laravel and VueJs Blog, using Laravel nova, GraphQL, NuxtJs, Apollo and ...more
Stars: ✭ 54 (-51.35%)
Mutual labels: nuxt, nuxtjs
Nuxt Compress
A simple static asset compression module for Nuxt that runs Gzip and Brotli compression during the build process
Stars: ✭ 61 (-45.05%)
Mutual labels: nuxt, nuxtjs
Nuxt Chat App
Frontend of real-time chat application built using nuxtjs, socket.io. Check the backend at https://github.com/binbytes/chat-app-server.
Stars: ✭ 77 (-30.63%)
Mutual labels: nuxt, nuxtjs
Realworld Nuxt
Nuxt.js implementation of RealWorld Frontend
Stars: ✭ 45 (-59.46%)
Mutual labels: nuxt, nuxtjs
Example Ecommerce Snipcart Vue
The Transglobal Candy Store: Sample front-end for the Sanity.io e-commerce schema with vue.js, nuxt.js, and snipcart
Stars: ✭ 89 (-19.82%)
Mutual labels: nuxt, nuxtjs
Nuxt Graphql Request
Easy Minimal GraphQL client integration with Nuxt.js.
Stars: ✭ 85 (-23.42%)
Mutual labels: nuxt, nuxtjs
Vue Api Query
💎 Elegant and simple way to build requests for REST API
Stars: ✭ 1,528 (+1276.58%)
Mutual labels: nuxt, nuxtjs
Nuxt Netlify
Dynamically generate `_headers` and `_redirects` files for Netlify in your Nuxt.js projects
Stars: ✭ 97 (-12.61%)
Mutual labels: nuxt, nuxtjs
Docker Nuxt
Docker image to run NUXT.js application in production mode
Stars: ✭ 71 (-36.04%)
Mutual labels: nuxt, nuxtjs
Quickjam
Starter template for Nuxt apps bundled with an API
Stars: ✭ 42 (-62.16%)
Mutual labels: nuxt, nuxtjs
Vue Masonry Wall
A pure vue responsive masonry layout without direct dom manipulation and ssr support.
Stars: ✭ 79 (-28.83%)
Mutual labels: nuxt, nuxtjs
@nuxtjs/dayjs
The best way for use Day.js easily in your Nuxt.js project.
Installation
$ yarn add @nuxtjs/dayjs # or npm install
Usage
1. Register dayjs module to your Nuxt Application
export default {
// ...
modules: [
'@nuxtjs/dayjs'
],
// Optional
dayjs: {
locales: ['en', 'ja'],
defaultLocale: 'en',
defaultTimeZone: 'Asia/Tokyo',
plugins: [
'utc', // import 'dayjs/plugin/utc'
'timezone' // import 'dayjs/plugin/timezone'
] // Your Day.js plugin
}
// ...
}
2. Use $dayjs on Context, Vue instance
with Context
<script>
export default {
asyncData({ $dayjs }) {
return {
now: $dayjs().format('YYYY/MM/DD')
}
}
}
</script>
with Vue instance
<script>
export default {
data() {
return {
latestClicked: null
}
},
methods: {
handleClickButton() {
this.latestClicked = this.$dayjs().format('YYYY/MM/DD')
}
}
}
</script>
For Typescript users
Add the types to your "types"
array in tsconfig.json
after the @nuxt/types
entry.
tsconfig.json
{
"compilerOptions": {
"types": [
"@nuxt/types",
"@nuxtjs/dayjs"
]
}
}
Development
$ git clone https://github.com/nuxt-community/dayjs-module.git
$ cd @nuxtjs/dayjs
$ yarn
License
MIT @potato4d
Note
This project generated by create-nuxt-module
Contributors
Thanks goes to these wonderful people (emoji key):
Takuma HANATANI(@potato4d) 💻 🐛 📖 💡 💬 👀 |
Bryan Daniel Velastegui Lucero 💻 |
Wei 💻 |
かずえもん 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].