diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-02-05 15:59:42 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-02-05 15:59:42 -0500 |
commit | f92505d78b82c6ac146e43054ebd12441575a602 (patch) | |
tree | 2897a21c04f473ee3100a6a59ccce6336a1f7692 /IkiWiki/Plugin/prettydate.pm | |
parent | fbe2ab4419e086ff84991bf25f1549aaabc5143b (diff) | |
parent | 11f4942d68f3276bfdc4688e4091e559f9481874 (diff) |
Merge branch 'master' into prefix-directives
Diffstat (limited to 'IkiWiki/Plugin/prettydate.pm')
-rw-r--r-- | IkiWiki/Plugin/prettydate.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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); } #}}} |