I have a short bit of code comparing two dates that does not seem to be working and I wanted to see if anyone could explain why.
date_default_timezone_set("America/New_York");
$today = date("m-d-y");
$dueDate = date("05-08-21");
if ($dueDate > $today) {
echo "<p> Success!";
}
else {
echo "<p> Failure!";
}
When I run this code I keep getting "Failure!" even though 05/08/21 is in the future.