https://github.com/markylaredo/nuxt-date-formatter
https://github.com/markylaredo/nuxt-date-formatter
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/markylaredo/nuxt-date-formatter
- Owner: markylaredo
- Created: 2025-02-26T08:25:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-26T09:03:41.000Z (over 1 year ago)
- Last Synced: 2025-02-26T09:33:45.877Z (over 1 year ago)
- Language: TypeScript
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **Note: This is a demo plugin.**
# Nuxt Date Formatter
A simple Nuxt.js plugin to format dates.
## Installation
To install this plugin, run:
```bash
pnpm add nuxt-date-formatter
```
## Usage
Register the plugin in your `nuxt.config.js` file:
```typescript
import dateFormatter from 'nuxt-date-formatter'
export default {
buildModules: [
'@nuxt/typescript-build'
],
plugins: [
'~/plugins/dateFormatter.ts'
]
}
```
Use the plugin in your components:
```vue
Formatted Date: {{ formattedDate }}
import { Component, Vue } from 'nuxt-property-decorator'
@Component
export default class FormattedDate extends Vue {
date: string = '2025-02-26'
get formattedDate(): string {
return this.$formatDate(this.date)
}
}
```