Sets the day of the month for the UTC date. If the date is greater than the number of days in the month, the month value also gets increased.
var myDate = new Date();
/* w w w. j ava 2 s. co m*/
myDate.setUTCDate(23);
console.log(myDate.toString());
The code above generates the following result.