diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-02-05 15:59:42 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-02-05 15:59:42 -0500 |
commit | f92505d78b82c6ac146e43054ebd12441575a602 (patch) | |
tree | 2897a21c04f473ee3100a6a59ccce6336a1f7692 /IkiWiki/Plugin/ddate.pm | |
parent | fbe2ab4419e086ff84991bf25f1549aaabc5143b (diff) | |
parent | 11f4942d68f3276bfdc4688e4091e559f9481874 (diff) |
Merge branch 'master' into prefix-directives
Diffstat (limited to 'IkiWiki/Plugin/ddate.pm')
-rw-r--r-- | IkiWiki/Plugin/ddate.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/ddate.pm b/IkiWiki/Plugin/ddate.pm index 6b67f4202..d081cb509 100644 --- a/IkiWiki/Plugin/ddate.pm +++ b/IkiWiki/Plugin/ddate.pm @@ -18,6 +18,10 @@ sub checkconfig () { #{{{ sub IkiWiki::displaytime ($;$) { #{{{ my $time=shift; + my $format=shift; + if (! defined $format) { + $format=$config{timeformat}; + } eval q{ use DateTime; use DateTime::Calendar::Discordian; @@ -27,7 +31,7 @@ sub IkiWiki::displaytime ($;$) { #{{{ } my $dt = DateTime->from_epoch(epoch => $time); my $dd = DateTime::Calendar::Discordian->from_object(object => $dt); - return $dd->strftime($IkiWiki::config{timeformat}); + return $dd->strftime($format); } #}}} 5 |