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

Assertion:date fails when matching February 29th without date #336

Open
rrajkomar opened this issue Feb 29, 2024 · 0 comments
Open

Assertion:date fails when matching February 29th without date #336

rrajkomar opened this issue Feb 29, 2024 · 0 comments

Comments

@rrajkomar
Copy link

The presence of the ! character in

$dateTime = DateTime::createFromFormat('!'.$format, $value);

causes an issue when testing without specifiying a year:

Assertion::date('29/02', 'd/m');

because the year is automatically set to 1970 and there is no 29th of February in 1970.

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