Citation :
$date = addslashes($data['rss']['channel']['item'][$n]['pubDate']);
if(strlen($date) == 31)
{
$annee = substr($date, 12, 4);
$mois = substr($date, 8, 3);
$jour = substr($date, 5, 2);
$heure = substr($date, 17, 8);
}
else
{
$annee = substr($date, 11, 4);
$mois = substr($date, 7, 3);
$jour = '0'.substr($date, 5, 1);
$heure = substr($date, 16, 8);
}
if($mois == "Jan" )
$mois = "01";
if($mois == "Feb" )
$mois = "02";
if($mois == "Mar" )
$mois = "03";
if($mois == "Apr" )
$mois = "04";
if($mois == "Mai" )
$mois = "05";
if($mois == "Jun" )
$mois = "06";
if($mois == "Jun" )
$mois = "07";
if($mois == "Aou" )
$mois = "08";
if($mois == "Sep" )
$mois = "09";
if($mois == "Oct" )
$mois = "10";
if($mois == "Nov" )
$mois = "11";
if($mois == "Dec" )
$mois = "12";
$date = ''.$annee.'-'.$mois.'-'.ereg_replace(" ", "0", $jour).' '.$heure.'';
|