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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ss.js
_formatters['Number'] = function(number, format, culture) { ... case 'p': case 'P': if (precision == -1) { precision = nf.perDD; } s = (Math.abs(number) * 100.0).toFixed(precision).toString(); if (precision && (nf.perDS != '.')) { var index = s.indexOf('.'); s = s.substr(0, index) + nf.perDS + s.substr(index + 1); } s = _commaFormatNumber(s, nf.perGW, nf.perDS, nf.perGS); if (number < 0) { s = String.format(culture, nf.perNP, s); } else { s = String.format(culture, nf.perPP, s); } break;
Possibly there should be ss.format
The text was updated successfully, but these errors were encountered:
Yes - looks leftover from previous implementation that didn't get cleaned up. There are couple more occurrences that need to be addressed in this: https://github.com/nikhilk/scriptsharp/blob/cc/src/Core/Scripts/Runtime/Format.js
I will get to them, or feel free to change and submit a pull request, and I'll merge.
Sorry, something went wrong.
No branches or pull requests
ss.js
_formatters['Number'] = function(number, format, culture) {
...
case 'p': case 'P':
if (precision == -1) {
precision = nf.perDD;
}
s = (Math.abs(number) * 100.0).toFixed(precision).toString();
if (precision && (nf.perDS != '.')) {
var index = s.indexOf('.');
s = s.substr(0, index) + nf.perDS + s.substr(index + 1);
}
s = _commaFormatNumber(s, nf.perGW, nf.perDS, nf.perGS);
if (number < 0) {
s = String.format(culture, nf.perNP, s);
}
else {
s = String.format(culture, nf.perPP, s);
}
break;
Possibly there should be
ss.format
The text was updated successfully, but these errors were encountered: