Comment time

On this page:

Syntax

<txp:comment_time />

The comment_time tag is a single tag which is used to display the time and date the comment was submitted. Should be used in Textpattern ‘comment’ type Form templates.

Attributes

This tag will accept the following attributes (case-sensitive):

format="format string"
Override the default date format set in the Preferences administration panel.
Values: any valid strftime string values, since, iso8601 (ISO 8601 reference), w3cdtf (W3CDTF reference), or rfc822 (RFC 822 reference).
Default: the ‘Date format’ set in preferences.
gmt="boolean"
Return either local time (according to the set time zone preferences) or GMT.
Values: 0 (local time) or 1 (GMT).
Default: 0.
lang="ISO language code"
Format time string suitable for the specified language (locale).
Values: locales adhere to ISO-639.
Default: unset (time format set in the Preferences administration panel.

Examples

Example 1: Comments display form

<txp:comment_message />
<p>
    <txp:comment_name />
    <txp:comment_time />
    <txp:comment_permlink>
        <txp:comment_id />
    </txp:comment_permlink>
</p>

Other tags used: comment_id, comment_message, comment_name, comment_permlink.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.