JavaScript Date setUTCFullYear()
JavaScript Date setUTCFullYear()
The setUTCFullYear() method is used to set the year of a date object according to UTC. It is also used to set the month and date.
Syntax:-
Its syntax is:- Date.setUTCFullYear(year, month, day)
Return:-
Its return is:- number of milliseconds of new date from 1 January, 1970
Further Explanation:-
Parameter | Description |
---|---|
year | Required. A value represents the year. Negative values are allowed |
month | Optional. An integer representing the month from 0 - 11. |
day | Optional. An integer representing the day of the month from 1 - 31. |