<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# Discordian date support fnord ikiwiki.
package IkiWiki::Plugin::ddate;

use IkiWiki 2.00;
no warnings;

sub import { #{{{
	hook(type =&gt; "checkconfig", id =&gt; "skeleton", call =&gt; \&amp;checkconfig);
} # }}}

sub checkconfig () { #{{{
	if (! defined $config{timeformat} ||
	    $config{timeformat} eq '%c') {
		$config{timeformat}='on %A, the %e of %B, %Y. %N%nCelebrate %H';
	}
} #}}}

sub IkiWiki::displaytime ($) { #{{{
	my $time=shift;
	eval q{
		use DateTime;
		use DateTime::Calendar::Discordian;
	};
	if ($@) {
		 return "some time or other ($@ -- hail Eris!)";
	}
	my $dt = DateTime-&gt;from_epoch(epoch =&gt; $time);
	my $dd = DateTime::Calendar::Discordian-&gt;from_object(object =&gt; $dt);
	return $dd-&gt;strftime($IkiWiki::config{timeformat});
} #}}}

5
</pre></body></html>