-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currency-derived fractional digit count defaults are inappropriately applied with scientific/engineering/etc. notation
#912
Labels
Comments
gibson042
changed the title
Currency-derived fractional digit count defaults are inappropriately applied with non-"standard" notation
Currency-derived fractional digit count defaults are inappropriately applied with non-"standard" Jul 18, 2024
notation
gibson042
changed the title
Currency-derived fractional digit count defaults are inappropriately applied with non-"standard"
Currency-derived fractional digit count defaults are inappropriately applied with scientific/engineering/etc. Jul 18, 2024
notation
notation
Currency formatting with engineering notation, is that a real-world issue? |
I would support a PR tweaking this behavior. |
sffc
added
s: discuss
Status: TG2 must discuss to move forward
c: numbers
Component: numbers, currency, units
labels
Aug 22, 2024
ben-allen
added a commit
to ben-allen/ecma402
that referenced
this issue
Sep 17, 2024
…er of fractional units used to display that currency when using standard notation. Previously this data was inappropriately used when using scientific, engineering, and compact notations. See issue tc39#912.
ben-allen
added a commit
to ben-allen/ecma402
that referenced
this issue
Sep 17, 2024
…er of minor units used to display that currency when using standard notation. Previously this data was inappropriately used to set the number of fractional digits displayed when formatting currency values in scientific, engineering, and compact notations. See issue tc39#912.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
(originally posted by @gibson042 in #839 (comment) )
We arguably have a bug where currency-derived fractional digit count defaults are applied even when the decimal point is moved away from its absolute position, as in
new Intl.NumberFormat("en", { style: "currency", currency, currencyDisplay: "code", notation: "engineering" }).format(12345).replace(/^.*\s/, "")
resulting in "12E3" for JPY but "12.35E3" for USD).Put another way, I think I expect currency-derived precision and corresponding rounding to apply only when
notation
is "standard" (i.e., not even when the decimal point happens to be in the right place with scientific/engineering/compact notation).The text was updated successfully, but these errors were encountered: