2 # Discordian date support fnord ikiwiki.
3 package IkiWiki::Plugin::ddate;
5 use IkiWiki::Render; # so we can redefine it here
9 IkiWiki::hook(type => "checkconfig", id => "skeleton",
10 call => \&checkconfig);
13 sub checkconfig () { #{{{
14 if (! defined $IkiWiki::config{timeformat} ||
15 $IkiWiki::config{timeformat} eq '%c') {
16 $IkiWiki::config{timeformat}='on %{%A, the %e of %B%}, %Y. %N%nCelebrate %H';
20 sub IkiWiki::displaytime ($) { #{{{
23 my $gregorian=POSIX::strftime("%d %m %Y", localtime($time));
24 my $date=`ddate +'$IkiWiki::config{timeformat}' $gregorian`;
26 if ($? || ! length $date) {
27 return "some time or other (hail Eris!)";