Closed Bug 56890 Opened 24 years ago Closed 24 years ago

ECMA conformance: Number.prototype.toLocaleString() undefined

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: david, Assigned: rogerl)

Details

js 1.5 rc1 does not conform to ECMA v3 15.7.4.3:
it does not defined Number.prototype.toLocaleString()

Here is the relevant text from the standard:

15.7.4.3 Number.prototype.toLocaleString()
Produces a string value that represents the value of the Number formatted
according to the
conventions of the host environment's current locale. This function is
implementation-dependent, and
it is permissible, but not encouraged, for it to return the same thing as
toString.
NOTE
The first parameter to this function is likely to be used in a future version of
this standard; it is
recommended that implementations do not use this parameter position for anything
else.
Looks like this was fixed as of Release Candidate 2. See bug 56878 for 
details. This is what I find in rc2 and in a build of the current trunk:


js> var n = new Number(5)

js> n.toString()
5

js> n.toLocaleString()
5

js> n.__proto__.toLocaleString()
0

js> Number.prototype.toLocaleString()
0
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Summary: ECMA conformance: Number.prototype.toLocaleString undefined → ECMA conformance: Number.prototype.toLocaleString() undefined
Marking Verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.