
committed by
Miško Hevery

parent
1ae77da609
commit
6ab5f3648a
@ -94,9 +94,9 @@ export class NgLocaleLocalization extends NgLocalization {
|
||||
export function getPluralCase(locale: string, nLike: number | string): Plural {
|
||||
// TODO(vicb): lazy compute
|
||||
if (typeof nLike === 'string') {
|
||||
nLike = parseInt(<string>nLike, 10);
|
||||
nLike = parseInt(nLike, 10);
|
||||
}
|
||||
const n: number = nLike as number;
|
||||
const n: number = nLike;
|
||||
const nDecimal = n.toString().replace(/^[^.]*\.?/, '');
|
||||
const i = Math.floor(Math.abs(n));
|
||||
const v = nDecimal.length;
|
||||
|
@ -50,7 +50,7 @@ function formatNumber(
|
||||
}
|
||||
}
|
||||
|
||||
return NumberFormatter.format(value as number, locale, style, {
|
||||
return NumberFormatter.format(value, locale, style, {
|
||||
minimumIntegerDigits: minInt,
|
||||
minimumFractionDigits: minFraction,
|
||||
maximumFractionDigits: maxFraction,
|
||||
|
Reference in New Issue
Block a user