Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Content-Length: 255491 | pFad | http://github.com/formatjs/formatjs/discussions/4699
ACFetched URL: http://github.com/formatjs/formatjs/discussions/4699
Alternative Proxies:
Uh oh!
There was an error while loading. Please reload this page.
-
Intl.NumberFormat.format*()
supports value argument as number, bigint or string. Corresponding methods inintl-numberformat
and its consumers, only support number.Support for string unlocks formatting high-precision values that would lose precision if converted to
number
. Also, string argument is well-supported across browsers.I know we want to stay in compliance with the spec so looking at the relevant parts (e.g.
format
):and "ToNumber" does prescribe handling for string:
Which implies that "value" can be string.
Should this be supported in this library? I am not sure if this lack of support is intentional or not. If not, please convert this to an issue.
Beta Was this translation helpful? Give feedback.
All reactions