From bb93fccf0690344aa77f9538a508959a6de09847 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Dec 2008 15:22:16 -0500 Subject: Coding style change: Remove explcit vim folding markers. --- doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn') diff --git a/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn b/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn index c908f57c8..8ecdf36d0 100644 --- a/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn +++ b/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn @@ -44,7 +44,7 @@ regenerate this one against that). %config %links %renderedfiles %pagesources %destsources); our $VERSION = 2.00; # plugin interface version, next is ikiwiki version our $version="2.1";my $installdir="/usr"; - @@ -70,6 +70,7 @@ sub defaultconfig () { #{{{ + @@ -70,6 +70,7 @@ sub defaultconfig () { plugin => [qw{mdwn inline htmlscrubber passwordauth openid signinedit lockedit conditional}], timeformat => '%c', @@ -52,27 +52,27 @@ regenerate this one against that). locale => undef, sslcookie => 0, httpauth => 0, - @@ -447,6 +448,15 @@ sub displaytime ($) { #{{{ + @@ -447,6 +448,15 @@ sub displaytime ($) { $config{timeformat}, localtime($time))); - } #}}} + } - +sub displaydate ($) { #{{{ + +sub displaydate ($) { + my $time=shift; + + # strftime doesn't know about encodings, so make sure + # its output is properly treated as utf8 + return decode_utf8(POSIX::strftime( + $config{dateformat}, localtime($time))); - +} #}}} + +} + - sub beautify_url ($) { #{{{ + sub beautify_url ($) { my $url=shift; diff --git a/Plugin/inline.pm b/Plugin/inline.pm index 8f6ab51..7bd6147 100644 --- a/Plugin/inline.pm +++ b/Plugin/inline.pm - @@ -148,6 +148,7 @@ sub preprocess_inline (@) { #{{{ + @@ -148,6 +148,7 @@ sub preprocess_inline (@) { $template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage})); $template->param(title => pagetitle(basename($page))); $template->param(ctime => displaytime($pagectime{$page})); -- cgit v1.2.3