mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
get rid of this ugly programlisting hack
This commit is contained in:
@@ -334,92 +334,131 @@ Feb 5, 2001
|
|||||||
Monday, February 5, 2001
|
Monday, February 5, 2001
|
||||||
14:33:00</programlisting>
|
14:33:00</programlisting>
|
||||||
</example>
|
</example>
|
||||||
<example>
|
<para>
|
||||||
<title>date_format conversion specifiers</title>
|
date_format conversion specifiers:
|
||||||
<programlisting>
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
%a - abbreviated weekday name according to the current locale
|
%a - abbreviated weekday name according to the current locale
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%A - full weekday name according to the current locale
|
%A - full weekday name according to the current locale
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%b - abbreviated month name according to the current locale
|
%b - abbreviated month name according to the current locale
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%B - full month name according to the current locale
|
%B - full month name according to the current locale
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%c - preferred date and time representation for the current locale
|
%c - preferred date and time representation for the current locale
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
|
%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%d - day of the month as a decimal number (range 00 to 31)
|
%d - day of the month as a decimal number (range 00 to 31)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%D - same as %m/%d/%y
|
%D - same as %m/%d/%y
|
||||||
|
</listitem>
|
||||||
%e - day of the month as a decimal number, a single digit is preceded by a
|
<listitem>
|
||||||
space (range 1 to 31)
|
%e - day of the month as a decimal number, a single digit is preceded by a space (range 1 to 31)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%g - Week-based year within century [00,99]
|
%g - Week-based year within century [00,99]
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%G - Week-based year, including the century [0000,9999]
|
%G - Week-based year, including the century [0000,9999]
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%h - same as %b
|
%h - same as %b
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%H - hour as a decimal number using a 24-hour clock (range 00 to 23)
|
%H - hour as a decimal number using a 24-hour clock (range 00 to 23)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%I - hour as a decimal number using a 12-hour clock (range 01 to 12)
|
%I - hour as a decimal number using a 12-hour clock (range 01 to 12)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%j - day of the year as a decimal number (range 001 to 366)
|
%j - day of the year as a decimal number (range 001 to 366)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%k - Hour (24-hour clock) single digits are preceded by a blank. (range 0 to 23)
|
%k - Hour (24-hour clock) single digits are preceded by a blank. (range 0 to 23)
|
||||||
|
</listitem>
|
||||||
%l - hour as a decimal number using a 12-hour clock, single digits preceeded by
|
<listitem>
|
||||||
a space (range 1 to 12)
|
%l - hour as a decimal number using a 12-hour clock, single digits preceeded by a space (range 1 to 12)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%m - month as a decimal number (range 01 to 12)
|
%m - month as a decimal number (range 01 to 12)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%M - minute as a decimal number
|
%M - minute as a decimal number
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%n - newline character
|
%n - newline character
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
|
%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%r - time in a.m. and p.m. notation
|
%r - time in a.m. and p.m. notation
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%R - time in 24 hour notation
|
%R - time in 24 hour notation
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%S - second as a decimal number
|
%S - second as a decimal number
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%t - tab character
|
%t - tab character
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%T - current time, equal to %H:%M:%S
|
%T - current time, equal to %H:%M:%S
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%u - weekday as a decimal number [1,7], with 1 representing Monday
|
%u - weekday as a decimal number [1,7], with 1 representing Monday
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
|
%U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
|
||||||
|
</listitem>
|
||||||
%V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1
|
<listitem>
|
||||||
is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.
|
%V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%w - day of the week as a decimal, Sunday being 0
|
%w - day of the week as a decimal, Sunday being 0
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
|
%W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%x - preferred date representation for the current locale without the time
|
%x - preferred date representation for the current locale without the time
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%X - preferred time representation for the current locale without the date
|
%X - preferred time representation for the current locale without the date
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%y - year as a decimal number without a century (range 00 to 99)
|
%y - year as a decimal number without a century (range 00 to 99)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%Y - year as a decimal number including the century
|
%Y - year as a decimal number including the century
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%Z - time zone or name or abbreviation
|
%Z - time zone or name or abbreviation
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
%% - a literal `%' character
|
%% - a literal `%' character
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
PROGRAMMERS NOTE: date_format is essentially a wrapper to PHP's strftime()
|
<note>
|
||||||
function. You may have more or less conversion specifiers available depending
|
<title>Programmers note</title>
|
||||||
on your system's strftime() function where PHP was compiled. Check your
|
<para>
|
||||||
system's manpage for a full list of valid specifiers.</programlisting>
|
date_format is essentially a wrapper to PHP's strftime()
|
||||||
</example>
|
function. You may have more or less conversion specifiers available depending
|
||||||
|
on your system's strftime() function where PHP was compiled. Check your
|
||||||
|
system's manpage for a full list of valid specifiers.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1 id="language.modifier.default">
|
<sect1 id="language.modifier.default">
|
||||||
|
Reference in New Issue
Block a user