Skip to content
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

Normative: Allow use of non-ISO 4217 data in CurrencyDigits AO #922

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/annexes.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ <h1>Implementation Dependent Behaviour</h1>
<li>
The patterns used for formatting values as decimal, percent, currency, or unit values per locale, with or without the sign, with or without accounting format for currencies, and in standard, compact, or scientific notation (<emu-xref href="#sec-formatnumber"></emu-xref>)
</li>
<li>
The number of fractional digits used when formatting currency values (<emu-xref href="#sec-formatnumber"></emu-xref>)
</li>
<li>
Localized representations of *NaN* and *Infinity* (<emu-xref href="#sec-formatnumber"></emu-xref>)
</li>
Expand Down
7 changes: 5 additions & 2 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -684,18 +684,21 @@ <h1>Properties of Intl.NumberFormat Instances</h1>
<emu-clause id="sec-numberformat-abstracts">
<h1>Abstract Operations for NumberFormat Objects</h1>

<emu-clause id="sec-currencydigits" type="abstract operation">
<emu-clause id="sec-currencydigits" type="implementation-defined abstract operation">
<h1>
CurrencyDigits (
_currency_: a String,
): a non-negative integer
</h1>
<dl class="header">
<dt>description</dt>
<dd></dd>
</dl>

<emu-alg>
1. Assert: IsWellFormedCurrencyCode(_currency_) is *true*.
1. Assert: _currency_ is the ASCII-uppercase of _currency_.
ben-allen marked this conversation as resolved.
Show resolved Hide resolved
1. If the ISO 4217 currency and funds code list contains _currency_ as an alphabetic code, return the minor unit value corresponding to the _currency_ from the list; otherwise, return 2.
1. Return a non-negative integer indicating the number of fractional digits used when formatting quantities of the currency corresponding to _currency_. If there is no available information on the number of digits to be used, return 2.
</emu-alg>
</emu-clause>

Expand Down
Loading