Loading locale in NodeJS
Loading locale on demand.
require('dayjs/locale/de')
// import 'dayjs/locale/de' // ES 2015
dayjs.locale('de') // use locale globally
dayjs().locale('de').format() // use locale in a specific instance
You can also load and get the locale object for further use.
var locale_de = require('dayjs/locale/de')
// import locale_de from 'dayjs/locale/de' // ES 2015