?
u
/
p
1-9
This specification consists of two parts:
An Amount is an object that wraps
The notation for
Rounding a
The abstract operation GetOption takes arguments options (an Object), property (a
The abstract operation CountSignificantDigits takes argument s (a decimal digit String) and returns a positive
The abstract operation CountFractionDigits takes argument s (a decimal digit String) and returns a non-negative
The abstract operation ApplyRoundingModeToPositive takes arguments m (a positive
The abstract operation RoundToFractionDigits takes arguments v (a
The abstract operation RoundToSignificantDigits takes arguments v (a
The abstract operation RenderMVWithFractionDigits takes arguments v (a
The abstract operation GetAmountOptions takes argument opts (an Object) and returns either a
The Amount
Given a Number argument, the
The
This method returns a String value that renders the underlying
It performs the following steps when called:
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement this method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of this method is used:
This method produces a String value that represents this Amount object formatted according to the conventions of the toString
The meanings of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.
This method returns a fresh Amount object whose underlying
It performs the following steps when called:
This method is called by ECMAScript language operators to convert an Amount to a primitive value. The allowed values are
It performs the following steps when called:
This section lists amendments which must be made to ECMA-402, the ECMAScript® 2024 Internationalization API Specification.
Text to be added is marked like this, and text to be deleted is marked like this.
Blocks of unmodified text between modified sections are marked by [...].
This definition supersedes the definition provided in es2025,
This function performs the following steps when called:
The abstract operation GetNumberFormatPattern takes arguments numberFormat (an Intl.NumberFormat) and x (an
The abstract operation ToIntlMathematicalValue takes argument value (an
The abstract operation SetNumberFormatUnitOptions takes arguments intlObj (an Intl.NumberFormat) and options (an Object) and returns either a
© 2025 Ben Allen, Jesse Alama
All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.