1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| $date = $astuce["astuce_date_ajout"];
$jour = substr($date,8,2);
$mois = substr($date,5,2);
$annee = substr($date,0,4);
$date_ast = date("Y-m-d", mktime(0, 0, 0, $mois, $jour , $annee));
$today = date("Ymd");
$day = substr($today,6,2);
$month = substr($today,4,2);
$year = substr($today,0,4);
//$date_ast = "$annee$mois$jour";
//echo $today;
$maintenant = date("Y-m-d", mktime(0, 0, 0, $month, $day , $year));
$resultat = ($maintenant - $date_ast);
echo 'résultat '.$resultat.'<br />';
echo 'date astuce '.$date_ast.'<br />';
echo 'maintenant '.$maintenant.'<br />'; |
Partager