Re: A little confused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe <savage@xxxxxxxxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux