# Discordian date support fnord ikiwiki.
package IkiWiki::Plugin::ddate;
use IkiWiki;
-use IkiWiki::Render; # so we can redefine it here:
+use IkiWiki::Render; # so we can redefine it here
no warnings;
sub import { #{{{
my $gregorian=POSIX::strftime("%d %m %Y", localtime($time));
my $date=`ddate +'$IkiWiki::config{timeformat}' $gregorian`;
chomp $date;
+ if ($? || ! length $date) {
+ return "some time or other (hail Eris!)";
+ }
return $date;
} #}}}