];
}
-sub import { #{{{
+sub import {
hook(type => "getsetup", id => "prettydate", call => \&getsetup);
hook(type => "checkconfig", id => "prettydate", call => \&checkconfig);
-} # }}}
+}
-sub getsetup () { #{{{
+sub getsetup () {
return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
prettydateformat => {
type => "string",
example => '%X, %B %o, %Y',
safe => 1,
rebuild => 1,
},
-} #}}}
+}
-sub checkconfig () { #{{{
+sub checkconfig () {
if (! defined $config{prettydateformat} ||
$config{prettydateformat} eq '%c') {
$config{prettydateformat}='%X, %B %o, %Y';
$config{timetable}[$h] = $config{timetable}[$h - 1];
}
}
-} #}}}
+}
-sub IkiWiki::displaytime ($;$) { #{{{
+sub IkiWiki::formattime ($;$) {
my $time=shift;
my $format=shift;
if (! defined $format) {
$format=~s/\%X/$t/g;
return strftime($format, \@t);
-} #}}}
+}
1