make relativedate work for the dates on the recentchanges page

Having a always current relative date on recentchanges is very, very nice.
master
Joey Hess 2008-10-17 21:21:07 -04:00
parent ef4b9b5420
commit 02ec92c6cb
2 changed files with 2 additions and 1 deletions

View File

@ -173,6 +173,7 @@ sub store ($$$) { #{{{
$template->param( $template->param(
%$change, %$change,
commitdate => displaytime($change->{when}, "%X %x"), commitdate => displaytime($change->{when}, "%X %x"),
commitdate_raw => scalar localtime($change->{when}),
wikiname => $config{wikiname}, wikiname => $config{wikiname},
); );
IkiWiki::run_hooks(pagetemplate => sub { IkiWiki::run_hooks(pagetemplate => sub {

View File

@ -24,7 +24,7 @@
<span class="desc"><br />Commit type:</span> <span class="desc"><br />Commit type:</span>
<span class="committype"><TMPL_VAR COMMITTYPE></span> <span class="committype"><TMPL_VAR COMMITTYPE></span>
<span class="desc"><br />Date:</span> <span class="desc"><br />Date:</span>
<span class="changedate"><TMPL_VAR COMMITDATE></span> <span class="changedate"><span class="date" title="<TMPL_VAR COMMITDATE_RAW>"><TMPL_VAR COMMITDATE></span></span>
</div> </div>
<div class=changelog> <div class=changelog>
<TMPL_LOOP NAME="MESSAGE"> <TMPL_LOOP NAME="MESSAGE">