From ee1ccfa863b9d56cf7ec987f7fee89c98c484b0b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 19:22:22 -0400 Subject: [PATCH] use relativedate as the css class for dates that should display relative --- IkiWiki/Plugin/relativedate.pm | 2 +- doc/plugins/relativedate.mdwn | 6 +++--- underlays/javascript/relativedate.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index d9d8f7776..f4dba61a4 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -53,7 +53,7 @@ sub display ($;$) { #{{{ my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time))); - return ''. + return ''. IkiWiki::formattime($time, $format).''; } #}}} diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn index 121bce477..32f8c798b 100644 --- a/doc/plugins/relativedate.mdwn +++ b/doc/plugins/relativedate.mdwn @@ -10,7 +10,7 @@ show the absolute date instead. Also, this plugin can be used with other 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: - Fri Oct 17 18:36:13 EDT 2008 + Fri Oct 17 18:36:13 EDT 2008 diff --git a/underlays/javascript/relativedate.js b/underlays/javascript/relativedate.js index c5e62b3cc..8e05d4065 100644 --- a/underlays/javascript/relativedate.js +++ b/underlays/javascript/relativedate.js @@ -1,4 +1,4 @@ -// 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. @@ -7,7 +7,7 @@ var dateElements; 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; -- 2.44.0