
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@nuxtjs/date-fns
Advanced tools
Modern JavaScript date utility library - date-fns for Nuxt.js
@nuxtjs/date-fns dependency to your projectyarn add --dev @nuxtjs/date-fns # or npm install --save-dev @nuxtjs/date-fns
@nuxtjs/date-fns to the buildModules section of nuxt.config.jsexport default {
buildModules: [
// Simple usage
'@nuxtjs/date-fns',
// With options
['@nuxtjs/date-fns', { /* module options */ }]
]
}
:warning: If you are using Nuxt < v2.9 you have to install the module as a dependency (No --dev or --save-dev flags) and use modules section in nuxt.config.js instead of buildModules.
export default {
buildModules: [
'@nuxtjs/date-fns'
],
dateFns: {
/* module options */
}
}
Add the types to your "types" array in tsconfig.json after the @nuxt/types entry.
:warning: Use @nuxt/vue-app instead of @nuxt/types for nuxt < 2.9.
{
"compilerOptions": {
"types": [
"@nuxt/types",
"@nuxtjs/date-fns"
]
}
}
Why?
For typescript to be aware of the additions to the
nuxt Context, thevue instanceand thevuex store, the types need to be merged via declaration merging by adding@nuxtjs/date-fnsto your types.
localesArray[String][]Locales to be imported.
defaultLocaleStringnullYou can preset default locale.
formatStringnullYou can preset default format.
methodsArraynullMethods to be imported. If not defined all methods are imported.
This module inject $dateFns to your project:
<template>
<div>
// Using default format and locale
{{ $dateFns.format(new Date()) }}
// Using custom format
{{ $dateFns.format(new Date(), 'yyyy-MM-dd') }}
// Using custom format and locale
{{ $dateFns.format(new Date(), 'yyyy-MM-dd', { locale: 'ru' }) }}
// Using asyncData
{{ dateFormatted }}
</div>
</template>
<script>
export default {
asyncData(ctx) {
return {
// $dateFns is available in context
dateFormatted: ctx.app.$dateFns.format(new Date())
}
}
}
</script>
Copyright (c) Nuxt Community
FAQs
Modern JavaScript date utility library - date-fns for Nuxt.js
The npm package @nuxtjs/date-fns receives a total of 1,353 weekly downloads. As such, @nuxtjs/date-fns popularity was classified as popular.
We found that @nuxtjs/date-fns demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.