return $ret;
} #}}}
-sub displaytime ($) { #{{{
+sub displaytime ($;$) { #{{{
my $time=shift;
+ my $format=shift;
+ if (! defined $format) {
+ $format=$config{timeformat};
+ }
# strftime doesn't know about encodings, so make sure
# its output is properly treated as utf8
- return decode_utf8(POSIX::strftime(
- $config{timeformat}, localtime($time)));
+ return decode_utf8(POSIX::strftime($format, localtime($time)));
} #}}}
sub beautify_url ($) { #{{{
}
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
$template->param(title => pagetitle(basename($page)));
- $template->param(ctime => displaytime($pagectime{$page}));
+ $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));
if ($actions) {
my $file = $pagesources{$page};
* Add liblwpx-paranoidagent-perl to recommends of Debian package,
this is needed to do OpenID really securely.
* ikiwiki.setup is licensed same as the basewiki, not GPLed.
+ * inline: Add timeformat parameter to control how the ctime of
+ inlined pages is displayed. Closes: #451019
- -- Joey Hess <joeyh@debian.org> Tue, 13 Nov 2007 16:03:46 -0500
+ -- Joey Hess <joeyh@debian.org> Tue, 13 Nov 2007 16:11:54 -0500
ikiwiki (2.12) unstable; urgency=low
the rss/atom feeds. The default is the same as the `show` value above.
* `feedonly` - Only generate the feed, do not display the pages inline on
the page.
+* `timeformat` - Use this to specify how to display the time or date for pages
+ in the blog. The format string is passed to the strftime(3) function.
If the directory name is not absolute, ikiwiki will assume it is in
the parent directory of the configured underlaydir.
-#### `displaytime($)`
+#### `displaytime($;$)`
Given a time, formats it for display.
+The optional second parameter is a strftime format to use to format the
+time.
+
#### `gettext`
This is the standard gettext function, although slightly optimised.
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-11-12 14:36-0500\n"
+"POT-Creation-Date: 2007-11-13 16:14-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:708
+#: ../IkiWiki.pm:711
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""