archives

« Bugzilla Issues Index

#570 — 15.9.5.44: "the this value"


In 15.9.5.44 "Date.prototype.toJSON ( key )",
step 1 says:
"Let O be the result of calling ToObject,
giving it the this value as its argument."

But for functions in 15.9.5.*, the phrase "this Date object" is normally used instead of "the this value".


Similarly, in B.2.3.2 "Date.prototype.setYear (year)",
steps 3, 7, and 8 refer to "the this value",
but would more normally refer to "this Date object".


but toJSON is explicitly defined to be generic, so the this value need not be a Date object or even an object.


Okay, that makes sense for toJSON(), but setYear() doesn't appear to be generic.

Moreover, the algorithm for setYear refers to "this time value", which is defined in terms of "this Date object".

So I'm thinking that comment #1 is still valid.


fixed in setYear for rev 11 editor's draft


in October 26, 2012 release draft