Version
v19.3.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
No response
What steps will reproduce the bug?
const percentFormatter = new Intl.NumberFormat("en-US", { style: "percent" });
console.log(percentFormatter.formatRange(0.5, 0.55));
console.log(percentFormatter.formatRange(0.5, 0.5));
How often does it reproduce? Is there a required condition?
all the time for all locales
What is the expected behavior?
Similar to:
const numberFormatter = new Intl.NumberFormat("en-US");
console.log(numberFormatter.formatRange(50_000, 55_000)); // 50,000–55,000
console.log(numberFormatter.formatRange(50_000, 50_000)); // ~50,000
What do you see instead?
Additional information
maximumFractionDigits behavior:
> percentFormatter = new Intl.NumberFormat("en-US", { style: 'percent' });
NumberFormat [Intl.NumberFormat] {}
> percentFormatter.formatRange(0.1234, 0.1234)
~1,200%
> percentFormatter = new Intl.NumberFormat("en-US", { style: 'percent', maximumFractionDigits:10 });
NumberFormat [Intl.NumberFormat] {}
> percentFormatter.formatRange(0.1234, 0.1234)
~1,234%
Version
v19.3.0
Platform
Microsoft Windows NT 10.0.22621.0 x64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
all the time for all locales
What is the expected behavior?
Similar to:
What do you see instead?
Additional information
maximumFractionDigitsbehavior: