diff --git a/manual/template_lang.rst b/manual/template_lang.rst index fe62547ef1..b4926b8e42 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -271,6 +271,8 @@ The following functions are available in addition to those described in single-f ap : use a 12-hour clock instead of a 24-hour clock, with 'ap' replaced by the localized string for am or pm. AP : use a 12-hour clock instead of a 24-hour clock, with 'AP' replaced by the localized string for AM or PM. iso : the date with time and timezone. Must be the only format present. + + You might get unexpected results if the date you are formatting contains localized month names, which can happen if you changed the format tweaks to contain MMMM. In this case, instead of using something like ``{pubdate:format_date(yyyy)}``, write the template using template program mode as in ``{:'format_date(raw_field('pubdate'),'yyyy')'}``. * finish_formatting(val, fmt, prefix, suffix) -- apply the format, prefix, and suffix to a value in the same way as done in a template like ``{series_index:05.2f| - |- }``. This function is provided to ease conversion of complex single-function- or template-program-mode templates to :ref:`general program mode ` (see below) to take advantage of GPM template compilation. For example, the following program produces the same output as the above template::