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

Dates with years with 5 digits do not round-trip #1780

Open
midgleyc opened this issue Jan 25, 2022 · 0 comments
Open

Dates with years with 5 digits do not round-trip #1780

midgleyc opened this issue Jan 25, 2022 · 0 comments

Comments

@midgleyc
Copy link

Describe the bug
dayjs(dayjs('20222-02-02').format()) is invalid date.

Expected behavior
dayjs(dayjs('20222-02-02').format()) should be the same as dayjs('20222-02-02').

dayjs('+020222-02-03T00:00:00.000') works -- if there's something I can pass to format to make it format ISO 8601 if the year is less than 10k, and otherwise like this, that would be a good workaround.

Information

  • Day.js Version: 1.10.6
  • OS: Ubuntu
  • Browser: Node
  • Time zone: GMT
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