cvs: smarty /docs/en/designers/language-modifiers language-modifier-date-format.xml
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1123279156@cvsserver> |
messju Fri Aug 5 17:59:16 2005 EDT
Modified files:
/smarty/docs/en/designers/language-modifiers
language-modifier-date-format.xml
Log:
added explanation of changed behaviour of date_format's parsing
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml?r1=1.9&r2=1.10&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml:1.9 smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml:1.10
--- smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml:1.9 Sun Jun 5 15:46:19 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml Fri Aug 5 17:59:15 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<sect1 id="language.modifier.date.format">
<title>date_format</title>
<informaltable frame="all">
@@ -47,6 +47,24 @@
formatting of the date. If the date passed to
<command>date_format</command> is empty and a second parameter is passed,
that will be used as the date to format.
+ <note>
+ <para>
+ Since Smarty-2.6.10 numeric values passed to date_format are
+ <emphasis>always</emphasis> (except for mysql timestamps, see
+ below) interpreted as a unix timestamp.
+ </para>
+ <para>
+ Before Smarty-2.6.10 numeric strings that where also parsable by
+ strtotime() in php (like "YYYYMMDD") where sometimes - depending
+ on the underlying implementation of strtotime() - interpreted as
+ date strings and not as timestamps.
+ </para>
+ <para>
+ The only exception are mysql timestamps: They are also numeric
+ only and 14 characters long ("YYYYMMDDHHMMSS"). Mysql timestamps
+ have precedence over unix timestamps.
+ </para>
+ </note>
</para>
<example>
<title>date_format</title>
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php