2.1.124 [ECMA-262-1999] Section 15.9.5.41, Date.prototype.setUTCFullYear (year [, month [, date ] ] )

V0184:

If month is not specified, this function behaves as if month were specified with the value getUTCMonth( ).

If date is not specified, this function behaves as if date were specified with the value getUTCDate( ).

(The bulleted step is added before step 1)

  • __If the argument year is not present, throw a TypeError exception.__

  1. Let t be this time value; but if this time value is NaN, let t be +0.

  2. Call ToNumber(year).

  3. If month is not specified, compute MonthFromTime(t); otherwise, call ToNumber(month).

  4. If date is not specified, compute DateFromTime(t); otherwise, call ToNumber(date).

  5. Compute MakeDay(Result(2), Result(3), Result(4)).

  6. Compute MakeDate(Result(5), TimeWithinDay(t)).

  7. Set the [[Value]] property of the this value to TimeClip(Result(6)).

  8. Return the value of the [[Value]] property of the this value.

The length property of the setUTCFullYear method is 3.