SyntaxFix
Write A Post
Hire A Developer
Questions
$toBeComparedDate = '2014-08-12'; $today = (new DateTime())->format('Y-m-d'); //use format whatever you are using $expiry = (new DateTime($toBeComparedDate))->format('Y-m-d'); var_dump(strtotime($today) > strtotime($expiry)); //false or true