Show last modification date of wiki page


This macro shows the last modification date of the specified page, or the page the macro appears in if not specified. An optional argument, delta, can be given to show the time elapsed since the last modification. The output is placed in a <span> with a title that gives the exact modification date and the author of the change.

This plugin retrieves information from the database and adds it to a wiki page. Currently supported keywords: author, version, changed_by, comment, changed_ts. See below for examples.

Bugs/Feature Requests

Existing bugs and feature requests for LastModifiedMacro are here.

If you have any issues, create a new ticket.


9 / 9


1 / 3


1 / 1


Download the zipped source from here.


You can check out LastModifiedMacro from here using Subversion, or browse the source with Trac.


Basic usage:

[[LastModified(MacroBazaar, delta)]]

For example, [[LastModified(CustomMacros)]] produces:

<span class="last-modified" title="Wed Oct  6
    20:34:51 2004 by username">2004-10-06</span>

Alternatively, [[LastModified(CustomMacros,delta)]] produces:

<span class="last-modified" title="Wed Oct  6
    20:34:51 2004 by username">7 weeks</span>

This is a CSS style to apply an underline and a tooltip:

    border-bottom: 1px dotted gray;
    cursor: help;

Building off the above style, the colour of the TocMacro can be matched further. To apply this to all projects, append the below text to file /usr/share/trac/htdocs/css/wiki.css:

/* Styles for the LastModified wikimacro */
    border-bottom: 1px dotted gray;
    border-top: 1px dotted gray;
    background: #FFFFDD;
    cursor: help;

Recent Changes

13555 by rjollos on 2014-01-08 20:18:39
Removed examples that will throw an error when displayed on the plugin admin page. Refs #11218.
13553 by rjollos on 2014-01-08 07:23:22
Allow delta to be specified as the first argument. Refs #11218.

  • Strip whitespace from arguments.
  • Raise a TracError if there are too many arguments.

Thanks to martin.wagner@… for the defect report.

13353 by rjollos on 2013-08-13 21:27:30
Remove incorrect mimetype property.


Author: HorsePunchKid
Maintainer: none (needsadoption)
Contributors: Nathan Kidd, Bill Coffman

Last modified 8 weeks ago Last modified on Sep 2, 2016, 6:31:01 PM