Parsing '2020-12-20T15:00:00+08' is broken in 1.10+
See original GitHub issueDescribe the bug
const day = require('dayjs');
console.log(`result:${dayjs('2020-12-20T15:00:00+08').format()}`);
In Day.js v1.9.8, we got result:2020-12-20T15:00:00+08:00.
In Day.js v1.10.7, we got result:Invalid Date.
Is this a new feature or breaking change?
Expected behavior
we expect the result is result:2020-12-20T15:00:00+08:00.
Information
- Day.js: 1.10.7
- OS: Ubuntu 20.04.1
- Node.js: v.16.9.1
- Time zone: Asia/Taipei (CST, +0800)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Regions file parsing broken #1215 - samtools/bcftools - GitHub
Regions file parsing broken #1215 ... bcftools 1.10.2 ... Same issue if I use -T option, tab-separated file is not parsed properly.
Read more >Parsing broken XML - java - Stack Overflow
The only way I found to fix this was to tokenize the whole input and rebuild it piece by piece filtering out the...
Read more >Json.Decode.Broken - Elm Packages
Parse the given JSON string. Errors come straight from elm/parser and may not be super useful. It may be worth changing this parser...
Read more >An Artisan Guide to Building Broken C Parsers - Blog
The cases examined here are interesting because a sufficiently advanced compiler will need to consider them at parse time.
Read more >Most vexing parse is broken : CPP-11676 - YouTrack
CLion does not parse function declarations correctly if they contain user-defined types or typedefs. This happens when the parameter of the declared ...
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

I’ve test v1.10.0. The result:Invalid Date.
Thanks for your suggestion. It work well when we applied the plugin with time format.
Show my snippet in node.js below for anyone finding a solution.