JavaScript setFullYear() Function Example

JavaScript getDay() Function get the Current Day and set today day.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <title>JavaScript getDay() function</title>
</head>
<body>
    <script type="text/javascript">
        var dt = new Date();
        dt.setFullYear(2006);
        document.write(dt);
    </script>
</body>
</html>

Run it...   »

Example Result