{"id":14964267,"url":"https://github.com/nuxt-community/dayjs-module","last_synced_at":"2025-04-12T14:56:31.881Z","repository":{"id":37045720,"uuid":"174366676","full_name":"nuxt-community/dayjs-module","owner":"nuxt-community","description":"Day.js module for your Nuxt 2 project.","archived":false,"fork":false,"pushed_at":"2025-04-09T17:50:56.000Z","size":2663,"stargazers_count":261,"open_issues_count":26,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T18:51:43.516Z","etag":null,"topics":["dayjs","nuxt","nuxt-module","nuxtjs","vue"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@nuxtjs/dayjs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuxt-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-07T15:04:41.000Z","updated_at":"2025-04-08T12:57:44.000Z","dependencies_parsed_at":"2023-02-06T21:31:55.315Z","dependency_job_id":"ca61aed5-c1fb-4e2f-b1b2-0b70630536e0","html_url":"https://github.com/nuxt-community/dayjs-module","commit_stats":{"total_commits":377,"total_committers":13,"mean_commits":29.0,"dds":0.5251989389920424,"last_synced_commit":"5a8fe195257d7bdcf611a12e45c4d254e36f2522"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fdayjs-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fdayjs-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fdayjs-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-community%2Fdayjs-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuxt-community","download_url":"https://codeload.github.com/nuxt-community/dayjs-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586248,"owners_count":21128996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dayjs","nuxt","nuxt-module","nuxtjs","vue"],"created_at":"2024-09-24T13:32:54.035Z","updated_at":"2025-04-12T14:56:31.854Z","avatar_url":"https://github.com/nuxt-community.png","language":"TypeScript","funding_links":["https://www.patreon.com/potato4d","https://patreon.com/potato4d"],"categories":["TypeScript"],"sub_categories":[],"readme":"# @nuxtjs/dayjs\n\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![donate: Patreon](https://img.shields.io/badge/donate-patreon-orange.svg?style=flat-square)](https://www.patreon.com/potato4d)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![NPM version](https://img.shields.io/npm/v/@nuxtjs/dayjs.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/dayjs)\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)\n[![NPM downloads](https://img.shields.io/npm/dm/@nuxtjs/dayjs.svg?style=flat)](https://npmjs.com/package/@nuxtjs/dayjs)\n[![codecov](https://codecov.io/gh/nuxt-community/dayjs-module/branch/master/graph/badge.svg)](https://codecov.io/gh/nuxt-community/dayjs-module)\n\n\u003e The best way to use Day.js easily in your Nuxt 2 project.\n\nLooking for a Nuxt 3 alternative? Try out:\n- https://github.com/nathanchase/dayjs\n- https://github.com/fumeapp/dayjs\n\n\u003ca href=\"https://patreon.com/potato4d\"\u003e\n  \u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" height=\"50\"\u003e\n\u003c/a\u003e\n\n## Installation\n\n```bash\n$ yarn add @nuxtjs/dayjs # or npm install\n```\n\n## Usage\n\n### 1. Register dayjs module to your Nuxt Application\n\n```js\nexport default {\n  // ...\n  modules: [\n    '@nuxtjs/dayjs'\n  ],\n\n  // Optional\n  dayjs: {\n    locales: ['en', 'ja'],\n    defaultLocale: 'en',\n    defaultTimeZone: 'Asia/Tokyo',\n    plugins: [\n      'utc', // import 'dayjs/plugin/utc'\n      'timezone' // import 'dayjs/plugin/timezone'\n    ] // Your Day.js plugin\n  }\n  // ...\n}\n```\n\n### 2. Use $dayjs on Context, Vue instance\n\nwith Context\n\n```html\n\u003cscript\u003e\nexport default {\n  asyncData({ $dayjs }) {\n    return {\n      now: $dayjs().format('YYYY/MM/DD')\n    }\n  }\n}\n\u003c/script\u003e\n```\n\nwith Vue instance\n\n```html\n\u003cscript\u003e\nexport default {\n  data() {\n    return {\n      latestClicked: null\n    }\n  },\n  methods: {\n    handleClickButton() {\n      this.latestClicked = this.$dayjs().format('YYYY/MM/DD')\n    }\n  }\n}\n\u003c/script\u003e\n```\n\n### For Typescript users\n\nAdd the types to your `\"types\"` array in `tsconfig.json` after the `@nuxt/types` entry.\n\nFor dayjs plugins, add their relative types like `dayjs/plugin/_pluginName_`.\n\n#### tsconfig.json\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\n      \"@nuxt/types\",\n      \"@nuxtjs/dayjs\",\n      \"dayjs/plugin/relativeTime\",\n    ]\n  }\n}\n```\n\n## Development\n\n```bash\n$ git clone https://github.com/nuxt-community/dayjs-module.git\n$ cd @nuxtjs/dayjs\n$ yarn\n```\n\n## License\n\nMIT @potato4d\n\n## Note\n\nThis project generated by [create-nuxt-module](https://github.com/potato4d/create-nuxt-module)\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://potato4d.me\"\u003e\u003cimg src=\"https://github.com/potato4d.png?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTakuma HANATANI(@potato4d)\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nuxt-community/dayjs-module/commits?author=potato4d\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/nuxt-community/dayjs-module/issues?q=author%3Apotato4d\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/nuxt-community/dayjs-module/commits?author=potato4d\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#example-potato4d\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#question-potato4d\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/nuxt-community/dayjs-module/pulls?q=is%3Apr+reviewed-by%3Apotato4d\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/bvelastegui\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/16880910?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBryan Daniel Velastegui Lucero\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nuxt-community/dayjs-module/commits?author=bvelastegui\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://resume.a-wei.tw\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/19729705?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eWei\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nuxt-community/dayjs-module/commits?author=a65162\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://kazuemon.me\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/12812934?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eかずえもん\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nuxt-community/dayjs-module/commits?author=kazuemon\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://daikiojm.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/10055293?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaiki Ojima\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/nuxt-community/dayjs-module/commits?author=daikiojm\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-community%2Fdayjs-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuxt-community%2Fdayjs-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-community%2Fdayjs-module/lists"}