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

Why dayjs can parse invalid format #1117

Closed
sa9sha9 opened this issue Oct 8, 2020 · 1 comment
Closed

Why dayjs can parse invalid format #1117

sa9sha9 opened this issue Oct 8, 2020 · 1 comment

Comments

@sa9sha9
Copy link

sa9sha9 commented Oct 8, 2020

Describe the bug
Why dayjs parses '2020-01-hoge' to '2020-01-01' without no error?
image

Here is playground
https://runkit.com/sa9sha9/dayjs-playground

Expected behavior
It failed like moment.js does.

Information

  • Day.js Version [e.g. v1.8.21]
  • OS: macOS catalina
  • Browser chrome 85
  • Time zone: GMT+09:00 JST
@sa9sha9 sa9sha9 changed the title Why dayjs can receive invalid format Why dayjs can parse invalid format Oct 8, 2020
@sa9sha9
Copy link
Author

sa9sha9 commented Oct 8, 2020

Oh it's solved using CustomParseFormat plugin.
This issue could be closed. Thanks.

image

@sa9sha9 sa9sha9 closed this as completed Oct 8, 2020
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

1 participant