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.

Strict parsing support with UTC plugin

See original GitHub issue

Hi,

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

github_iconTop GitHub Comments

1reaction
iamkuncommented, Jul 6, 2021

🎉 This issue has been resolved in version 1.10.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

1reaction
LucasHFScommented, Apr 7, 2021

I’m working on this on #1443 , Let me know if something else is needed.

Read more comments on GitHub >

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

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