Go to main content

Modified

Contents

Syntax

<txp:modified />

The modified tag is a single tag which is used to return the modification date of the article being displayed. The default format is determined by the settings specified in the Date Format, or Archive Date Format, fields in the Preferences panel. It can be overridden with the format attribute.

Attributes

Tag will accept the following attributes (case-sensitive) as well as the global attributes :

calendar="calendar string"
Set the calendar (for example, chinese).
Values: any valid ICU calendar string.
Default: unset.
format="format string"
Override the default date format set in the Preferences panel.
Values: any valid strftime string values.
Default: the ‘Archive 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 panel.

Examples

Example 1: Display ‘since’ format date setting

<p>
    Modified:
    <txp:modified format="since" />
</p>

This would result in the following HTML output:

<p>Modified: 29 days ago</p>

Example 2: Display custom date format

<p>
    Modified:
    <txp:modified format="%b %d, %Y" />
</p>

This would result in the following HTML output:

<p>modified: May 28, 2005</p>

Genealogy

Version 4.5.0

class and wraptag attributes added.

Version 4.0.7

Tag support added.

If you notice any kind of problem with this page's construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)