assert
assert copied to clipboard
Assertion:date fails when matching February 29th without date
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.