The setFullYear() method of date object sets full year for specified date. Use it for example to sets full year.
Syntax
This will produce following result