tc39 / tc39/proposal-amount

March 2026 review

Open
#87 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
58
Forks
12
Avg merge
2h 35m
Merged PRs (30d)
2

Description

Here's my review of the latest linked version of the proposed spec, currently dated February 24, 2026:

  • It doesn't look like any of the comments from my November review have been addressed. The spec looks quite similar to that from November.

  • The spec and proposal seem to have diverged. For example, there are no unit conversions in the spec.

  • What happens if this is asked to display 2 meters using en-US "person" units? If I understand this class correctly, the result will be something like 79 inches, which is wrong from an internationalization perspective. If we standardize the wrong answer, it will be hard to fix it later, leading to the same user disruption we had with initially standardizing getYear, not being able to fix it without breaking existing usage, and later having to tell everyone to use getFullYear instead.

  • Introduction: Extra *

  • Is there a reason to collect the total number of digits in StringIntlMV? It's not used anywhere and not actually useful due to leading zeros.

  • ApplyRoundingModeToPositive: Extra * on line 6

  • RoundAmountValueToFractionDigits: Use the ReverseRoundingMode helper function above?

  • RenderAmountValueWithFractionDigits:

    • numDigits should be fractionDigits
    • Line 8: remove the rounding code here. This function must never round. If it ever does, it's a spec bug and can generate incorrect results such as turning -0 into 0.
    • Line 9 is incorrect. As written, e will always be zero. I assume e should appear in the exponent, but then it will still always be zero because rounded is an integer. Picking the largest value here doesn't work either if, for example, v is 0.
    • Line 11 is incorrect. I can't tell what it's trying to do.
    • Line 13 is incorrect in a variety of ways. For example, n can never be positive on line e, but it can be negative.
  • get Decimal.prototype.significantDigits: No one sets [[SignificantDigits]]. This should call FractionToSignificantDigits instead.

  • ToIntlMathematicalValue: Spec type error on intlMV: it's a list but used as a scalar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked February 24, 2026 proposal spec and compare the Introduction, ApplyRoundingModeToPositive, RoundAmountValueToFractionDigits, RenderAmountValueWithFractionDigits, get Decimal.prototype.significantDigits, and ToIntlMathematicalValue sections against this review. Determine which listed discrepancies are still present and whether the spec and proposal agree. Done means the review findings have been resolved or explicitly addressed in the proposal.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
internationalization
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.