We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$money = new Money(97,new BCMathProvider()); echo $money->format('');
Yields 0.097 instead of 0.97
0.097
0.97
Looks like the issue with the use of str_pad, as str_pad('0',0) will still output a 0.
str_pad
str_pad('0',0)
https://github.com/Lusitanian/PHPMoney/blob/master/src/PHPMoney/Money.php#L48
str_pad($value, 2, '0', STR_PAD_LEFT) might be a solution here.
str_pad($value, 2, '0', STR_PAD_LEFT)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Yields
0.097
instead of0.97
Looks like the issue with the use of
str_pad
, asstr_pad('0',0)
will still output a 0.https://github.com/Lusitanian/PHPMoney/blob/master/src/PHPMoney/Money.php#L48
str_pad($value, 2, '0', STR_PAD_LEFT)
might be a solution here.The text was updated successfully, but these errors were encountered: