par
dunbar » 24 janv. 2011, 19:20
Salut,
Voici un exemple
<?php
setlocale(LC_TIME, "fra"); // sous Windows
//setlocale(LC_TIME, "fr_FR"); // Web
$_GET['a'] = '11-2-20'; //Pour l'exemple sinon c'est dans l'url
$get_date = (isset($_GET['a']) ? $_GET['a'] : null );
//Affiche 19-janvier-2011 .
echo strftime("%d-%B-%Y",strtotime($get_date)) . "\n";
?>
Salut,
Voici un exemple
[php]
<?php
setlocale(LC_TIME, "fra"); // sous Windows
//setlocale(LC_TIME, "fr_FR"); // Web
$_GET['a'] = '11-2-20'; //Pour l'exemple sinon c'est dans l'url
$get_date = (isset($_GET['a']) ? $_GET['a'] : null );
//Affiche 19-janvier-2011 .
echo strftime("%d-%B-%Y",strtotime($get_date)) . "\n";
?>
[/php]