Open JeyaRajesh opened 4 years ago
Hi Team, I am using "money-works": "^1.5.4" in my reactive native app for localisation.
It is woking fine in terminal and in Runkit editor.
The same code is not working in mobile app or any other browser.(tested in safari,mozilla and Chrome)
const price1 = new Money(9000, "CLP"); console.log("Money.. Chile..9000.price =", price1.toLocaleString("es-CL"));
Output in Terminal /Command window: Money.. Chile..9000.price = $9.000
output in Chrome debugger console or Iphone/Android. Money.. Chile..9000.price = $9000
Issue only with amount <10K.
Refer here for details : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
Type the below code in the above URL editor box. console.log(new Intl.NumberFormat('es-CL', { style: 'currency', currency: 'CLP' }).format(3456)); // expected output: "$3.456"
you can see the issue.Looks like a browser compatibility issue.
Facing same issue for Chile,Peru,CostRica.
I need urgent help on this.
Thanks, Jeya
Hi Team,
Is there any update on the above issue or can we modify the code and raise a pull request over here.
Hi Team, I am using "money-works": "^1.5.4" in my reactive native app for localisation.
It is woking fine in terminal and in Runkit editor.
The same code is not working in mobile app or any other browser.(tested in safari,mozilla and Chrome)
const price1 = new Money(9000, "CLP"); console.log("Money.. Chile..9000.price =", price1.toLocaleString("es-CL"));
Output in Terminal /Command window: Money.. Chile..9000.price = $9.000
output in Chrome debugger console or Iphone/Android. Money.. Chile..9000.price = $9000
Issue only with amount <10K.
Refer here for details : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
Type the below code in the above URL editor box. console.log(new Intl.NumberFormat('es-CL', { style: 'currency', currency: 'CLP' }).format(3456)); // expected output: "$3.456"
you can see the issue.Looks like a browser compatibility issue.
Facing same issue for Chile,Peru,CostRica.
I need urgent help on this.
Thanks, Jeya