X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4ac5685744e3678e8c583f671978746ddc37e9a1..6ebb411e8bf57f433b357ca4666eb367b9ecc569:/IkiWiki/Plugin/prettydate.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/prettydate.pm b/IkiWiki/Plugin/prettydate.pm index b6110e427..745e6a1de 100644 --- a/IkiWiki/Plugin/prettydate.pm +++ b/IkiWiki/Plugin/prettydate.pm @@ -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); } #}}}