By: Sheepy
Date: 2013-09-06
Time: 10:43
|
Bug in numeric formatting: prefix/postfix with paddingFound a bug in numeric formatting.
Specifically, string prefix and postfix are not compatible with number padding.
Fix: In my 3.8.3-beta, padding is applyed after prefix/postfix processing, at line 3119. Reversing the order, so that str_pad goes right before str_replace, seems to fix the issue. |
|
By: Sheepy
Date: 2013-09-06
Time: 10:47
|
Re: Bug in numeric formatting: prefix/postfix with paddingBy the way, the third numeric example for numeric formatting seems to be wrong.
It says:
But as I test it, the actual result is $ 2,456. |
|
By: Skrol29
Date: 2013-09-07
Time: 01:55
|
Re: Bug in numeric formatting: prefix/postfix with paddingHi Sheepy,
Thanks for this information. > But as I test it, the actual result is $ 2,456. Fixed in the manual. >In my 3.8.3-beta, padding is applyed after prefix/postfix processing, at line 3119. >Reversing the order, so that str_pad goes right before str_replace, seems to fix the issue. Fixed in the beta. And I've complete the unit tests in order to check this case. You can download the new version here: http://www.tinybutstrong.com/dl.php?f=tbs_beta.zip&s=2 |