Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format yyyy-MM-dd don't work like as before #61

Open
Quineone opened this issue Apr 30, 2021 · 2 comments
Open

format yyyy-MM-dd don't work like as before #61

Quineone opened this issue Apr 30, 2021 · 2 comments

Comments

@Quineone
Copy link

version: "@nuxtjs/date-fns": "^1.5.0"

For now only uppercase fromat string can work, like YYYY-MM-DD

{{ $dateFns.format(new Date('2021-05-01'), 'yyyy-MM-dd') }}  // output `yyyy-05-za`

{{ $dateFns.format(new Date('2021-05-01'), 'YYYY-MM-DD') }}  // output `2021-05-01`
@Quineone Quineone changed the title [bug] format yyyy-MM-dd don't work like as before format yyyy-MM-dd don't work like as before Apr 30, 2021
@man-andy
Copy link

man-andy commented May 6, 2021

We are having the same issue. Seems like it's not backward compatible.

@hawkup
Copy link

hawkup commented Jul 24, 2021

I face this issue because I install @nuxtjs/apollo before @nuxtjs/date-fns.

@nuxtjs/apollo require date-fns version ^1.27.2
@nuxtjs/date-fns require date-fns version ^2.19.0.
I look at the package-lock.json it makes date-fns version ^1.27.2 is the main version of the app. when you import date-fns on the app it will use this version.

I solved this issue by

  1. remove package-lock.json
  2. run npm install to recreate package-lock.json again to make version ^2.19.0 be the main version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants