Declaration:
<? class HTMLDateTime extends HTMLTag ?>
Description: This tag displays formatted date. The template variable name holding the timestamp to display is passed via the key attribute, and the format is specified by the format attribute. Note that the timestamp must always be the UNIX timestamp, i.e., it is considered to be the GMT time (exactly as returned by the time() function). The time displayed will be adjusted to the timezone of the document's locale. If no timestamp given (i.e., the key attribute points to an invalid template variable), the current time will be displayed. If there is no locale set for the document, this tag will use strftime function to format the date and time according to the value of the format attribute. If there is no format attribute specified, this tag will revert to the locale's default; if there is no locale, it will use the "%H:%M:%S GMT" format string. Note Since the format string uses the '%' symbol, make sure you have not template variables named like first format specifier or include a leading space in the format attribute. The format string is the same as for PHP strftime function (also see I18NLocale::formatDateTime for notes). Since 1.2.0.Beta this tag supports the mode attribute, which, if present, must contain either 'date' or 'time' strings. If so, the meaning and values for the format attribute change: it must be either 'short', 'long' or 'full'. If these conditions are met, this tag will use the I18NLocale::formatDate or I18NLocale::formatTime methods depending on the value of the mode attribute. The format specifier will be either I18N::SHORT, I18N::LONG or I18N::FULL depending on the value of the format attribute value. Parent Classes: SDNode , SDElement , HTMLTag See also:
Authors:
Methods:
|
|