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

fikse isValidDate slik at den også avslår 'Invalid date' som NaN #3417

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

sirimykland
Copy link
Collaborator

Dagens løsning håndterer ugyldige datoer som '22-07-2012', '2. mai' eller undefined feil.
isValidDate returnerer dem som gyldige fordi de er Invalid Date og ikke NaN som testen sjekker på.

.valueOf() fikser dette.

Copy link

sonarcloud bot commented Nov 5, 2024

@sirimykland sirimykland merged commit 4908f92 into main Nov 5, 2024
4 checks passed
@sirimykland sirimykland deleted the fix/forbedre-hasValidDate branch November 5, 2024 10:19
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