sub IkiWiki::displaytime ($;$) { #{{{
my $time=shift;
+ my $format=shift;
+ if (! defined $format) {
+ $format=$config{prettydateformat};
+ }
eval q{use Date::Format};
error($@) if $@;
$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);
} #}}}