2.1.122 [ECMA-262-1999] Section 15.9.5.39, Date.prototype.setUTCMonth (month [, date ] )

V0182:

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 month is not present, throw a TypeError exception.__

  1. Let t be this time value.

  2. Call ToNumber(month).

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

  4. Compute MakeDay(YearFromTime(t), Result(2), Result(3)).

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

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

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

The length property of the setUTCMonth method is 2.