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

Error parsing string #933

Open
acba opened this issue Jun 18, 2020 · 1 comment
Open

Error parsing string #933

acba opened this issue Jun 18, 2020 · 1 comment

Comments

@acba
Copy link

acba commented Jun 18, 2020

Describe the bug
Just found this bug on my app, dayjs can't parse the string right, even when i'm forcing the format.
I'm trying to parse the string '02022000'. Got working using something to separate the numbers.

image

Just used the devtools on https://day.js.org/ to get the image above

Expected behavior
I would expect to use dayjs('02022000', 'DDMMYYYY').format('DD/MM/YYYY') and get 02/02/2000

image

Information

  • Day.js Version: v1.8.27
  • OS: Windows 10
  • Browser: Chrome 83.0.4103.106
  • Time zone: GMT -3
@iamkun
Copy link
Owner

iamkun commented Jun 19, 2020

Please check https://day.js.org/docs/en/parse/string-format and make sure you have enabled CustomParseFormat plugin.

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

2 participants