Re: A little confused
| From: | shiplu | Date: | Tue, 23 Apr 2013 10:16:56 +0000 |
| Subject: | Re: A little confused | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320967@lists.php.net to get a copy of this message | ||
On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe <savage@savage.za.org> wrote:
> echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y");
>
Why not construct DateTime object
echo date_format(new DateTime($_SESSION['ExpiryDate']), "D, \t\h\e jS \o\f
M Y");
Or
$dt = new DateTime($_SESSION['ExpiryDate']);
echo $dt->format("D, \t\h\e jS \o\f M Y");
I personally like the later. It takes less characters to do more.
--
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader