The best I've tried is to convert both date to milliseconds using the PHP strtotime("{date}") then compare both dates.
Example
$date1 = strtotime(date("d-m-y"));
$date2 = strtotime(date("d-m-y"));
if ($date2 >= $date1){
echo 'Date 2 is greater than Date 1';
}else{
echo 'Date 1 is greater than Date 2';
}