JavaScript Date setUTCMonth()
JavaScript Date setUTCMonth()
The setUTCMonth() method is used for setting the month of a date object according to UTC from 0 to 11. We can also use it to set the day of the date.
Syntax:-
Its syntax is:- Date.setUTCMonth(month, day)
Return:-
Its return is:- number of milliseconds of new date from 1 January, 1970
Further Explanation:-
Parameter | Description |
---|---|
month | Required. An integer representing the month from 0 - 11. |
day | Optional. An integer representing the day of the month from 1- 31. |