From 8f512efcad9e9849fb399980b15d78f1b30f815d Mon Sep 17 00:00:00 2001 From: "Jesus M. Castagnetto" Date: Sun, 29 Dec 2002 23:44:35 +0000 Subject: [PATCH] Finished documentation. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@109339 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/money-format.xml | 154 +++++++++++++++++-- 1 file changed, 137 insertions(+), 17 deletions(-) diff --git a/reference/strings/functions/money-format.xml b/reference/strings/functions/money-format.xml index 31f15fd56b..5ae74dc5aa 100644 --- a/reference/strings/functions/money-format.xml +++ b/reference/strings/functions/money-format.xml @@ -1,5 +1,5 @@ - + money_format @@ -112,20 +112,116 @@ #n - + The maximum number of digits (n) expected + to the left of the decimal character (e.g. the decimal point). It is + used usually to keep formatted output aligned in the same columns, + using the fill character if the number of digits is less than + n. If the number of actual digits is + bigger than n, then this specification is + ignored. + + + If grouping has not been suppressed using the ^ + flag, grouping separators will be inserted before the fill + characters (if any) are added. Grouping separators will not be + applied to fill characters, even if the fill character is a digit. + + + To ensure alignment, any characters appearing before or after the + number in the formatted output such as currency or sign symbols are + padded as necessary with space characters to make their positive and + negative formats an equal length. + + + Right Precision + + + + + .p + + + A period followed by the number of digits + (p) after the decimal character. If the + value of p is 0 (zero), the decimal + character and the digits to its right will be omitted. If no right + precision is included, the default will dictated by the current + local in use. The amount being formatted is rounded to the specified + number of digits prior to formatting. + + + + + + + + + Conversion Characters + + + + + i + + + The number is formatted according to the locale's international + currency format (e.g. for the USA locale: USD 1,234.56). + + + + + n + + + The number is formatted according to the locale's national + currency format (e.g. for the en_US locale: $1,234.56). + + + + + n + + + The number is formatted according to the locale's national + currency format (e.g. for the de_DE locale: DM1.234,56). + + + + + % + + + Returns the the % character. + + + + + + + + + The LC_MONETARY category of the locale settings, + affects the behavior of this function. Use + setlocale to set to the appropriate default locale + before using this function. + + + Characters before and after the formatting string will be returned + unchanged. + + - <function>number_format</function> Example + <function>money_format</function> Example - For instance, French notation usually use two decimals, - comma (',') as decimal separator, and space (' ') as - thousand separator. This is achieved with this line : + We will use different locales and format specifications to + illustrate the use of this function. ]]> @@ -153,7 +272,8 @@ - See also: number_format,sprintf, + See also: setlocale, + number_format,sprintf, printf and sscanf.