Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Utilisation de ‘strtotime()’ pour lire et convertir la date au format englais

 date
{filelink=15245}

<?php

$mydatestrings = array("now", "today", "tomorrow", "yesterday",
"friday", "next friday", "last saturday", "+5 hours", "-1 month", "+30 minutes",
"30 seconds", "+2 years -1 month","last week", "next week","last month", "last year", "4 weeks ago"
);

foreach($mydatestrings as $mydate)
{
    echo "$mydate:" . date('r', strtotime($mydate)) ."<br/>";
}
?>

No comments yet.

Leave a Comment