Sets the month of the UTC date

Description

setUTCMonth(month)
Sets the month of the UTC date, which is any number 0 or greater. Numbers greater than 11 add years.

Example


      var myDate = new Date();
      /*from ww  w . j ava2 s .c  o m*/
      myDate.setUTCMonth(01);
      console.log(myDate.toString());
      

The code above generates the following result.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window