X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4ac5685744e3678e8c583f671978746ddc37e9a1..4ed0a630cb8a10d583c5e88cc7a87a5cecdedc8d:/IkiWiki/Plugin/prettydate.pm?ds=inline 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); } #}}}