You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intl.NumberFormat has a signDisplay option that handles when to display the number sign. If we set it to always it should always display the sign, but React Native doesn't display a plus sign.
Steps to reproduce
// Tested with `en-US` as well without any difference.constlocale='sv-SE'constnumberFormatter=newIntl.NumberFormat(locale,{signDisplay: 'always'})constpercentFormatter=newIntl.NumberFormat(locale,{style: 'percent',signDisplay: 'always'})numberFormatter.format(22)// Displays 22, but should display +22percentFormatter.format(0.22)// Displays 22 %, but should display +22 %
Thank you for reporting this. Our Intl implementation on iOS is implemented on top of APIs exposed by Foundation, which means that some functionality is difficult or impossible to implement. signDisplay is one of those features, and is currently unsupported.
However, we're aware of this, and have a plan in the long term to fix it through an overhaul of our Intl implementation. (see #1211)
Description
Intl.NumberFormat
has asignDisplay
option that handles when to display the number sign. If we set it toalways
it should always display the sign, but React Native doesn't display a plus sign.Steps to reproduce
React Native Version
0.73.4
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/95Z5GGAwW7qZzA0Ne4Huf
Screenshots and Videos
The text was updated successfully, but these errors were encountered: