- date: documentation ( source)
<?php
//echo (new DateTime())->format('Y-m-d');
$azi = date('Y-m-d');
//$azi->sub(new DateInterval('P5D'));
$lead_time= (new DateTime('2014-09-05 13:18:26'))->format('Y-m-d');
if($lead_time<$azi){
// Leaduri mai vechi
$l_class="";
}else{
// Leaduri Fresh
$l_class="fresh_leads";
echo "Fresh";
}
/*
$azi->sub(new DateInterval('P5D'));
echo $azi;
*/