dayjs("2021-01-26T14:25:04.871Z", "YYYY-MM-DDTHH:mm:ss.SSSZ") doesn't work
See original GitHub issueDescribe the bug
dayjs("2021-01-26T14:25:04.871Z", "YYYY-MM-DDTHH:mm:ss.SSSZ") doesn’t work
moment("2021-01-26T14:25:04.871Z", "YYYY-MM-DDTHH:mm:ss.SSSZ") works
Expected behavior Should work as moment does treating Z as +00:00
Information
- Day.js Version 1.10.3
- OS: Node v10.16.3
- Browser: Node v10.16.3
- Time zone: London
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Format
Get the formatted date according to the string of tokens passed in. To escape characters, wrap them in square brackets (e.g. [MM] )....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

the last 2 lines illustrate one of the differences of strict VS non-strict: only when using strict, a 13th month is considered invalid
oh ok I didn’t know we had to escape it
[Z], thanks for the clarification, will test it later. BTW, your last 2 lines have the same date input (month 13), I think you meant month 12 for the truthy one