Name
setYear() — NN 2 IE J1 ECMA 1
Synopsis
setYear(yearInt
)
Sets the year of a Date
object. Use
setFullYear()
if the browser versions you support
allow it.
Returned Value
New date in milliseconds.
Parameters
-
yearInt
Integer between and 99 for the years 1900 to 1999; four-digit integer starting with 2000. Four-digit integers also accepted for years before 2000.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.