Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomParseFormat does not parse UTC offset in strict mode #2741

Open
cvbge opened this issue Oct 5, 2024 · 0 comments
Open

CustomParseFormat does not parse UTC offset in strict mode #2741

cvbge opened this issue Oct 5, 2024 · 0 comments

Comments

@cvbge
Copy link

cvbge commented Oct 5, 2024

Describe the bug

// From CustomParseFormat documentation, assertion passes:
assert(dayjs("05/02/69 1:02:03 PM -05:00", "MM/DD/YY H:mm:ss A Z").isValid())

// Same example but with strict=true, assertion fails:
assert(dayjs("05/02/69 1:02:03 PM -05:00", "MM/DD/YY H:mm:ss A Z", true).isValid())

Expected behavior
Both should pass

Information

  • Day.js Version: 1.11.13
  • OS: Windows 10
  • Browser: NodeJs v20.17.0
  • Time zone: Europe/Warsaw UTC+2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant