reference/strings/functions/money-format.xml
715a125af5a86f0e6d6d5aa6cfa9c45257a433ac
...
...
@@ -6,6 +6,10 @@
6
6
<refpurpose>Formats a number as a currency string</refpurpose>
7
7
</refnamediv>
8
8
9
+
<refsynopsisdiv>
10
+
&warn.deprecated.function-7-4-0.removed-8-0-0;
11
+
</refsynopsisdiv>
12
+
9
13
<refsect1 role="description">
10
14
&reftitle.description;
11
15
<methodsynopsis>
...
...
@@ -162,7 +166,7 @@
162
166
value of <replaceable>p</replaceable> is 0 (zero), the decimal
163
167
character and the digits to its right will be omitted. If no right
164
168
precision is included, the default will dictated by the current
165
-
local in use. The amount being formatted is rounded to the specified
169
+
locale in use. The amount being formatted is rounded to the specified
166
170
number of digits prior to formatting.
167
171
</para>
168
172
</listitem>
...
...
@@ -229,22 +233,29 @@
229
233
</para>
230
234
</refsect1>
231
235

232
-
<refsect1 role="notes">
233
-
&reftitle.notes;
234
-
<note>
235
-
<para>
236
-
The function <function>money_format</function> is only defined if
237
-
the system has strfmon capabilities. For example, Windows does
238
-
not, so <function>money_format</function> is undefined in Windows.
239
-
</para>
240
-
</note>
241
-
<note>
242
-
<para>
243
-
The <constant>LC_MONETARY</constant> category of the locale settings,
244
-
affects the behavior of this function. Use <function>setlocale</function>
245
-
to set to the appropriate default locale before using this function.
246
-
</para>
247
-
</note>
236
+
<refsect1 role="changelog">
237
+
&reftitle.changelog;
238
+
<para>
239
+
<informaltable>
240
+
<tgroup cols="2">
241
+
<thead>
242
+
<row>
243
+
<entry>&Version;</entry>
244
+
<entry>&Description;</entry>
245
+
</row>
246
+
</thead>
247
+
<tbody>
248
+
<row>
249
+
<entry>7.4.0</entry>
250
+
<entry>
251
+
This function has been deprecated. Instead,
252
+
use <methodname>NumberFormatter::formatCurrency</methodname>.
253
+
</entry>
254
+
</row>
255
+
</tbody>
256
+
</tgroup>
257
+
</informaltable>
258
+
</para>
248
259
</refsect1>
249
260

250
261
<refsect1 role="examples">
...
...
@@ -287,7 +298,7 @@ echo money_format('%=*(#10.2n', $number) . "\n";
287
298
// ($********1,234.57)
288
299

289
300
// Let's justify to the left, with 14 positions of width, 8 digits of
290
-
// left precision, 2 of right precision, withouth grouping character
301
+
// left precision, 2 of right precision, without the grouping character
291
302
// and using the international format for the de_DE locale.
292
303
setlocale(LC_MONETARY, 'de_DE');
293
304
echo money_format('%=*^-14#8.2i', 1234.56) . "\n";
...
...
@@ -306,6 +317,24 @@ echo money_format($fmt, 1234.56) . "\n";
306
317
</para>
307
318
</refsect1>
308
319

320
+
<refsect1 role="notes">
321
+
&reftitle.notes;
322
+
<note>
323
+
<para>
324
+
The function <function>money_format</function> is only defined if
325
+
the system has strfmon capabilities. For example, Windows does
326
+
not, so <function>money_format</function> is undefined in Windows.
327
+
</para>
328
+
</note>
329
+
<note>
330
+
<para>
331
+
The <constant>LC_MONETARY</constant> category of the locale settings,
332
+
affects the behavior of this function. Use <function>setlocale</function>
333
+
to set to the appropriate default locale before using this function.
334
+
</para>
335
+
</note>
336
+
</refsect1>
337
+

309
338
<refsect1 role="seealso">
310
339
&reftitle.seealso;
311
340
<para>
312
341