Skip to content

change: make seconds and timezone optional in matchTime regex #70

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

Closed
wants to merge 1 commit into from

Conversation

shashank1010
Copy link
Contributor

Time validation regex is limited to hh:mm:ss(z|+00:00) format
https://regex101.com/r/CKXTQt/2

I modified the regex making seconds and timezone optional, so it can also validate hh:mm format https://regex101.com/r/u0mN8x/1

The two are also equally performant.

Time validation regex is limited to `hh:mm:ss(z|+00:00)` format
https://regex101.com/r/CKXTQt/2

I modified the regex making seconds and timezone optional, so it can also validate `hh:mm` format
https://regex101.com/r/u0mN8x/1

The two are also equally performant.
@shashank1010
Copy link
Contributor Author

This PR, unfortunately, breaks tests and incorrectly moves away from format validation specification.
#72 addresses these issues.

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

Successfully merging this pull request may close these issues.

1 participant