An open API service indexing awesome lists of open source software.

https://github.com/markylaredo/nuxt-date-formatter


https://github.com/markylaredo/nuxt-date-formatter

Last synced: 19 days ago
JSON representation

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)
}
}

```