
Dynom
By: a guest on
Jan 25th, 2010 | syntax:
PHP | size: 0.23 KB | hits: 126 | expires: Never
<?php
// Cool native comparing with objects !
$dateStart = new DateTime('yesterday');
$dateEnd = new DateTime('tomorrow');
if ($dateEnd < $dateStart) {
echo 'Woops, reverse order!';
} else {
echo 'All good, carry on.';
}