Closed imbrish closed 6 years ago
I had the same experience with Danish Krone and New Israeli Shekel. I didn't test any others for now.
Is this still an issue? I can't seem to reproduce it. Can you give me an exact example? Like the value you are sending to the method and the currency you are formatting it to along with the output you get and the output you expect.
Example:
currency_format('122,433.06', 'DKK')
→ 122 433,06 kr.
Yes, I still see this issue. Here's an example.
currency_format('10.00', 'BRL')
→ R$ 10,0000
I think I've fixes this issue, was encountering it with ZAR
The format for ZAR is in as 'R 1,0.00' but from looking at the code, the system works out that the decimal seperator is the , so it looks for this in the string and the number of characters after it denotes the decimal places, so changing this code to 'R 1,0,00' resolves the issue.
Not sure if I've read this right but it fixed it for me for this currency.
Oh perfect. I'll add a fix to the currency format presets. Thank you
Hi... Did you actually fixed this issue?
I'm still having this problem. For example: ZAR format: R 1,0.00 BRL format: R$ 1,0.00
currency_format(8214.246,'ZAR') => R 8 214,2460 (Should be R 8,214.25) currency_format(8214.246,'BRL') => R$ 8 214,2460 (Should be R$ 8,214.25)
If I remove the space in the format it works fine.
Still not fixed
Function below doesn't give results that one would expect if format involves extra space, dot etc.
Two examples:
kr 1,0.00
→kr 12 345,6789
kr. 1,0.00
→kr. 12.346
Both formats are default so it looks like something doesn't work as it should ;)