assert icon indicating copy to clipboard operation
assert copied to clipboard

Assertion:date fails when matching February 29th without date

Open rrajkomar opened this issue 2 years ago • 0 comments

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.

rrajkomar avatar Feb 29 '24 09:02 rrajkomar