Strict parsing support with UTC plugin
See original GitHub issueHi,
Looking at the dayjs function signature and at the String + Format documentation there is a strict parsing mode using a 3rd (or 4th when using locale) boolean flag:
dayjs(date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean)
Looking at the corresponding UTC plugin, it doesn’t seem to have such option available:
dayjs.utc(config?: dayjs.ConfigType, format?: string)
Did I miss something obvious in the documentation?
If not, is it something that’s worth be supported in the future?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:5 (3 by maintainers)
Top Results From Across the Web
String + Format · Day.js
Input Example Description
YY 01 Two‑digit year
YYYY 2001 Four‑digit year
M 1‑12 Month, beginning at 1
Read more >iamkun/dayjs - Gitter
I am having some timezone issues....I have some date/time objects that I have to convert from UTC time to EST. I need to...
Read more >Docs - Moment.js
The current specification defines parsing a variation of ISO 8601 strings, where date-only forms (like "2020-09-14" ) are parsed as UTC, instead of...
Read more >dayjs - UNPKG
25, * customParseFormat support parsing X x timestamp ... 34, * update UTC plugin type file for strict parsing ...
Read more >CustomParseFormat
CustomParseFormat extends `dayjs()` constructor to support custom formats of ... ›Plugins ... dayjs('1970-00-00', 'YYYY-MM-DD', true) // strict parsing.
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

🎉 This issue has been resolved in version 1.10.6 🎉
The release is available on:
Your semantic-release bot 📦🚀
I’m working on this on #1443 , Let me know if something else is needed.