- date: documentation ( source)
- strtotime: documentation ( source)
<?php
//$dat = new DateTime();
$date_format = "d.m.Y";
//$dat = $dat->format($date_format);
$dat = date($date_format, strtotime('now'));
$che = date($date_format, strtotime('01.06.2013'));
echo $dat."\n";
echo $che."\n";
if($dat >= $che)
{
echo($dat.' >= '.$che.' меняем баннеры');
}else{
echo($dat.' < '.$che);
}