[Edge]。→、
Intl.NumberFormat で指定数値を書式化して文字列で返します。
Intl.NumberFormat | Intl.NumberFormat。 |
---|---|
number | Number または BigInt。 |
文字列。
DA=new Intl.NumberFormat('ja'); //日本語。 D=DA.format(12345.6789); //=[string]:12,345.679 DA=new Intl.NumberFormat('ja-u-nu-fullwide'); //日本語で全角数字。 D=DA.format(12345.6789); //=[string]:12,345.679 DA=new Intl.NumberFormat('ar-u-nu-arab'); //アラビア語でアラビア・インド数字。 D=DA.format(12345.6789); //=[string]:١٢٬٣٤٥٫٦٧٩ DA=new Intl.NumberFormat('ja', {currency:'JPY', currencyDisplay:'symbol', style:'currency'}); //日本語、通貨は日本円、シンボル表示、書式は通貨。 D=DA.format(12345.6789); //=[string]:¥12,346 DA=new Intl.NumberFormat('ja', {minimumIntegerDigits:7}); //日本語、整数部最小7桁。 D=DA.format(12345.6789); //=[string]:0,012,345.679 DA=new Intl.NumberFormat('ja', {maximumSignificantDigits:3}); //日本語、数値の最大有効桁数3桁。 D=DA.format(12345.6789); //=[string]:12,300