2 # Discordian date support fnord ikiwiki.
3 package IkiWiki::Plugin::ddate;
9 hook(type => "getsetup", id => "ddate", call => \&getsetup);
20 sub IkiWiki::formattime ($;$) {
23 if (! defined $format) {
24 $format=$config{timeformat};
25 if ($format eq '%c') {
26 $format='on %A, the %e of %B, %Y. %N%nCelebrate %H';
31 use DateTime::Calendar::Discordian;
34 return "some time or other ($@ -- hail Eris!)";
36 my $dt = DateTime->from_epoch(epoch => $time);
37 my $dd = DateTime::Calendar::Discordian->from_object(object => $dt);
38 return $dd->strftime($format);