note 101508 deleted from function.strtotime by crell
| From: | crell@php.net | Date: | Thu, 30 Jun 2022 21:01:40 +0000 |
| Subject: | note 101508 deleted from function.strtotime by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218819@lists.php.net to get a copy of this message | ||
Note Submitter: x at xero dot nu
----
strtotime is awesome for converting dates.
in this example i will make an RSS date, an
ATOM date, then convert them to a human
readable m/d/Y dates.
<?php
$rss = date("r");
$atom = date("c");
$human1 = date('m/d/Y', strtotime($rss));
$human2 = date('m/d/Y', strtotime($atom));
echo $rss."<br />".$atom."<br />".$human1."<br
/>".$human2;
?>