Re: A little confused
| From: | Chris Knipe | Date: | Tue, 23 Apr 2013 10:19:14 +0000 |
| Subject: | Re: A little confused | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320968@lists.php.net to get a copy of this message | ||
Thanks for the replies guys - figured it out!
Using date() directly with strtotime() and the appropriate formating works
:)
date("D, \\t\h\e jS \o\\f M Y", strtotime($_SESSION['ExpiryTime']))
On Tue, Apr 23, 2013 at 12:16 PM, shiplu <shiplu.net@gmail.com> wrote:
>
> 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
>
--
Regards,
Chris Knipe