setFullYear

fun setFullYear(year: Int, month: Int = definedExternally, date: Int = definedExternally): Int(source)

Sets the year of the Date object using local time.

Parameters

year

A numeric value for the year.

month

A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.

date

A numeric value equal for the day of the month.

MDN Reference