iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
47.05k stars 2.31k forks source link

Valid date with UTC offset fails validaton #2730

Open cklogs opened 2 months ago

cklogs commented 2 months ago

Describe the bug

  1. Using the following date as an example: var input = "09/04/2024 21:12:50 +00:00";
  2. Strictly validate the input: var isValidDayJsDate = dayjs(input, "MM/DD/YYYY HH:mm:ss Z", true).isValid();
  3. BUG: Validation fails.

Expected behavior

Compliant date should pass validation.

Information