question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dayjs("2021-01-26T14:25:04.871Z", "YYYY-MM-DDTHH:mm:ss.SSSZ") doesn't work

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tbastynscommented, Jan 21, 2022

the last 2 lines illustrate one of the differences of strict VS non-strict: only when using strict, a 13th month is considered invalid

0reactions
ghiscodingcommented, Jan 21, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found