<html> <body> <button onclick="var myDate = new Date(); myDate.setFullYear(2000); alert(myDate);"> Date: set Full Year </button> </body> </html>