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

Invalid date value #932

Closed
buryleva opened this issue Jun 16, 2020 · 2 comments
Closed

Invalid date value #932

buryleva opened this issue Jun 16, 2020 · 2 comments

Comments

@buryleva
Copy link

Describe the bug
Parsing certain strings returns Invalid Date:
dayjs('2020-07-01T10:45:00.000Z').format("d MMMM YYYY") // 3 July 2020
Returns July 3 but must return July 1

dayjs('2020-06-30T10:45:00.000Z').format("d MMMM YYYY") // 2 June 2020
Returns 2 June but must return 30 June

Expected behavior
dayjs('2020-07-01T10:45:00.000Z').format("d MMMM YYYY")
Returns 1 July 2020

dayjs('2020-06-30T10:45:00.000Z').format("d MMMM YYYY") // 2 June 2020
Returns 30 June 2020

Information

  • Day.js Version [e.g. v1.8.28]
  • OS: [e.g. macOS]
  • Browser [e.g. chrome 62]
  • Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]
@iamkun
Copy link
Owner

iamkun commented Jun 16, 2020

Please check parsing tokens here: https://day.js.org/docs/en/display/format#list-of-all-available-formats

@buryleva
Copy link
Author

@iamkun Thanks

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