Open
Description
If trying to parse a date in which you also need to enable it validates correctly (i.e. using strict mode), you can do so with the following
dayjs(it, ["YYYY-MM-DDTHH:mm:ss.SSS[Z]", "YYYY-MM-DDTHH:mm:ss[Z]"], true);
However, if using the UTC plugin, it doesn't seem to allow specifying multiple formats so I can only do
const date = dayjs.utc(it, "YYYY-MM-DDTHH:mm:ss.SSS[Z]", true);
It would be great the behavior of utc could be extended to support multiple formats as well. Or if anyone knows a workaround to get strict validation and UTC both working together, I'd love to hear it.
Metadata
Metadata
Assignees
Labels
No labels