Answers for "check if date is past php"

PHP
0

check if date is past php

$date = new DateTime($event['date']);
$now = new DateTime();
if($date < $now) {
    echo 'Date is in the past';
}
Posted by: Guest on March-27-2021

Code answers related to "check if date is past php"

Browse Popular Code Answers by Language