Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php DateTime comparation


<?php
$date1 = new DateTime("now");
$date2 = new DateTime("tomorrow");

var_dump($date1 == $date2);
var_dump($date1 < $date2);
var_dump($date1 > $date2);
?>

Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #DateTime #comparation
ADD COMMENT
Topic
Name
4+2 =