my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z",
localtime($time)));
- return '<span class="date" title="'.$gmtime.'">'.
+ return '<span class="relativedate" title="'.$gmtime.'">'.
IkiWiki::formattime($time, $format).'</span>';
} #}}}
plugins like [[prettydate]] that change how the absolute date is displayed.
If this plugin is enabled, you may also add relative dates to pages in the
-wiki, by using html elements in the "date" class. For example, this will
-display as a relative date:
+wiki, by using html elements in the "relativedate" class. For example, this
+will display as a relative date:
- <span class="date">Fri Oct 17 18:36:13 EDT 2008</span>
+ <span class="relativedate">Fri Oct 17 18:36:13 EDT 2008</span>
-// Causes html elements in the 'date' and 'pagedate' classes to be displayed
+// Causes html elements in the 'relativedate' class to be displayed
// as relative dates. The date is parsed from the title attribute, or from
// the element content.
hook("onload", getDates);
function getDates() {
- dateElements = getElementsByClass('date');
+ dateElements = getElementsByClass('relativedate');
for (var i = 0; i < dateElements.length; i++) {
var elt = dateElements[i];
var title = elt.attributes.title;