Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

check if date is past php

$date = new DateTime($event['date']);
$now = new DateTime();
if($date < $now) {
    echo 'Date is in the past';
}
 
PREVIOUS NEXT
Tagged: #check #date #php
ADD COMMENT
Topic
Name
8+1 =