Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 1.079 kB
__NAME__ purpose
convert date to a specified format
__END__
__NAME__ description
The filter calls &tag-convert-date; to output date according to the
specified format string.
</para><para>
For the accepted formats in which the input date needs to be specified,
see &tag-convert-date;.
</para><para>
See &glos-time; glossary entry for a list and description of format specifiers.
__END__
__NAME__ see also
convert_date
__END__
__NAME__ notes
This filter looks almost exactly like the &tag-convert-date; tag,
but there's a simple difference in the implementation.
&tag-convert-date; tag called with an empty
or invalid time string it will default to the current
time; this filter called with an empty or invalid time string
will default to an empty value.
__END__
__NAME__ online: Filter example
<programlisting>
Year is [filter convert_date.%Y][time][/filter].
</programlisting>
__END__
__NAME__ online: Filter example
To get a pretty formatted date, such as "May 16, 2007", use
<programlisting>
[filter convert_date."%B %e, %Y"][time][/filter].
</programlisting>
__END__
Jump to Line
Something went wrong with that request. Please try again.