📜  javascript number format indonesia - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:24.380000             🧑  作者: Mango

代码示例1
console.log(new Intl.NumberFormat('id-ID', {
  style: 'currency',
  currency: 'IDR'
}).format(123456789)); // Rp 123.456.789,00

console.log(new Intl.NumberFormat('id-ID', {
  style: 'currency',
  currency: 'IDR',
  minimumFractionDigits: 0,
}).format(123456789)); // Rp 123.456.789