Date.setUTCFullYear()
Sets the year of a date object, according to universal time
The setUTCFullYear() method sets the full year for a specified date according to universal time.
Syntax
Parameters
yearValue
An integer specifying the numeric value of the year, for example, 1995.
monthValue
Optional. An integer between 0 and 11 representing the months January through December.
dayValue
Optional. An integer between 1 and 31 representing the day of the month. If you specify the dayValue
parameter, you must also specify the monthValue
.
Return value
The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.
Description
Examples
Using setUTCFullYear()
setUTCFullYear()
References
Contributors to this page
Uros Durdevic
Last updated