]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/prettydate.pm
* prettydate,ddate: Don't ignore time formats passed to displaytime
[git.ikiwiki.info.git] / IkiWiki / Plugin / prettydate.pm
index b6110e427b5ca9c9326f572ce2d3df7b955d226f..745e6a1de436e2db15b97ebe897858f891de2a51 100644 (file)
@@ -63,6 +63,10 @@ sub checkconfig () { #{{{
 
 sub IkiWiki::displaytime ($;$) { #{{{
        my $time=shift;
+       my $format=shift;
+       if (! defined $format) {
+               $format=$config{prettydateformat};
+       }
        
        eval q{use Date::Format};
        error($@) if $@;
@@ -93,7 +97,6 @@ sub IkiWiki::displaytime ($;$) { #{{{
 
        $t=~s{\%A-}{my @yest=@t; $yest[6]--; strftime("%A", \@yest)}eg;
 
-       my $format=$config{prettydateformat};
        $format=~s/\%X/$t/g;
        return strftime($format, \@t);
 } #}}}