Re: colons in date_format string
| From: | Joris Trooster / Interstroom | Date: | Wed, 07 Feb 2001 17:53:41 +0000 |
| Subject: | Re: colons in date_format string | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-86@lists.php.net to get a copy of this message | ||
Yes, that's right I had the same problem. The correct example should be:
{* print the hour, minute and second portion of a date *}
{$startTime|date_format:"%H:%M:%S"}
(capitals). %m = month, %M = minute
Joris.
----- Original Message -----
From: "Colin Dewey" <cndewey@hotmail.com>
To: <Smarty@lists.ispi.net>
Sent: Wednesday, February 07, 2001 6:49 PM
Subject: [smarty] colons in date_format string
> When using ":" in a date_format string such as in the Smarty manual
example:
>
> {* print the hour, minute and second portion of a date *}
> {$startTime|date_format:"%h:%m:%s"}
>
> The output looks like:
>
> 10, 33, 02
>
> instead of:
>
> 10:33:02
>
> I got around this by using the hex escape sequence for the colon
character,
> but it would be nice to know why even the manual example doesn't work.
>
> ---
> You are currently subscribed to smarty as: trooster@interstroom.nl
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at m¯Àë˜Â®NP¬äOƒ
> http://www.phpinsider.com/php/code/Smarty/
>