Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
ddate.pm
diff --git
a/IkiWiki/Plugin/ddate.pm
b/IkiWiki/Plugin/ddate.pm
index d081cb5094d56b5030ba54f7504d911785000643..c73317b2f81cbb46abb48b2a55357e8d77adb625 100644
(file)
--- a/
IkiWiki/Plugin/ddate.pm
+++ b/
IkiWiki/Plugin/ddate.pm
@@
-6,21
+6,25
@@
use IkiWiki 2.00;
no warnings;
sub import { #{{{
no warnings;
sub import { #{{{
- hook(type => "
checkconfig", id => "ddate", call => \&checkconfig
);
+ hook(type => "
getsetup", id => "ddate", call => \&getsetup
);
} # }}}
} # }}}
-sub checkconfig () { #{{{
- if (! defined $config{timeformat} ||
- $config{timeformat} eq '%c') {
- $config{timeformat}='on %A, the %e of %B, %Y. %N%nCelebrate %H';
- }
+sub getsetup { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
} #}}}
} #}}}
-sub IkiWiki::
display
time ($;$) { #{{{
+sub IkiWiki::
format
time ($;$) { #{{{
my $time=shift;
my $format=shift;
if (! defined $format) {
$format=$config{timeformat};
my $time=shift;
my $format=shift;
if (! defined $format) {
$format=$config{timeformat};
+ if ($format eq '%c') {
+ $format='on %A, the %e of %B, %Y. %N%nCelebrate %H';
+ }
}
eval q{
use DateTime;
}
eval q{
use DateTime;