Open easyitis opened 4 years ago
On debugging it can be seen that this is where the issue is:
// Match decimal and thousand separators
preg_match_all('/[\s\',.!]/', $format, $separators);
// NOTE: $separators is calculated as [" ", ",", "."]
if ($thousand = Arr::get($separators, '0.0', null)) {
if ($thousand == '!') {
$thousand = '';
}
}
$decimal = Arr::get($separators, '0.1', null);
This issue occurs whenever there's a space in the format code, for example: AED: دإ 1,0.00 ARS: $ 1,0.00
As an interim solution we can remove the spaces from all the format codes.
Same issue with me, for SAR also
Same issue with me, for SAR also
Please try removing spaces from all the format codes.
Same issue here. Very annoying. If I remove the space then it doesn't look correct. @Torann can you please fix this ASAP?
"fix this ASAP" for an open source package doesn't always go down well. If you see how you can fix it, consider a PR. But it's unfortunate and concerning to see there doesn't seem to be much activity on this project anymore. Maybe the maintainer can consider opening up sponsorship to motivate more work on it.
Unfortunately I don't have time to look into this, but I will be more than happy to review a PR.
Using version 1.0.17. Some currencies are not getting formatted correctly. Example: currency(1,'USD','AED',true) => "دإ 3,6731" (expected "دإ 3.67")