Skip to content

Luxon

This module is a wrapper for vue-luxon. A date formatting library for Vue.js.

Configuration

You can configure the module by adding the key luxon to the we object in your nuxt.config.js file.

js
 we: {
    luxon: {
      // options
    }
  }

WARNING

Time zone is set to Europe/Rome by default.

For an advanced configuration take a look at vue-luxon settings.

Basic Usage

js
const date = new Date().toISOString()

this.$luxon(date, 'short')
// 10/10/2019 12:00

this.$luxon(date, 'date')
// 10/10/2019

this.$luxon(date, 'time')
// 12:00

Formats

NameDescription
short6/4/2023, 10:36
shorts6/4/2023, 10:36:59
date06/04/2023
relative1 giorno fa
iso2023-04-06T10:36:59.826+02:00
med6 apr 2023, 10:36
meds6 apr 2023, 10:36:59
full6 aprile 2023 alle ore 10:36 CEST
fulls6 aprile 2023 alle ore 10:36:59 CEST
hugegiovedì 6 aprile 2023 alle ore 10:36 Ora legale dell’Europa centrale
hugesgiovedì 6 aprile 2023 alle ore 10:36:59 Ora legale dell’Europa centrale
time10:36
times10:36:59
time24longoffset10:36:59 Ora legale dell’Europa centrale
date_full6 aprile 2023
date_hugegiovedì 6 aprile 2023
date_med6 apr 2023
date_meddgio 6 apr 2023
date_short6/4/2023