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

Fail early when parsing a date from an empty or blank string #181

Merged
merged 1 commit into from
Mar 16, 2025

Conversation

sebj
Copy link
Contributor

@sebj sebj commented Mar 16, 2025

Just a small optimization to save looping through a bunch of date formats or trying a number of different date formatters for an empty/blank string – return nil early when attempting to parse a date from an empty or blank string

@nmdias
Copy link
Owner

nmdias commented Mar 16, 2025

Looks good 👍

Thank you

@nmdias nmdias merged commit 0a95017 into nmdias:main Mar 16, 2025
7 checks passed
@sebj sebj deleted the dateformatter-fail-early branch March 16, 2025 16:20
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.

2 participants