<p class="copyright" id="copyright"></p>
<p>// 1. Traditional way of retrieving current year by breaking down the accumulated milliseconds.

<p class="copyright" id="new-copyright"></p>
<p>// 2. The easier way of retrieving current year by calling getFullYear()</p>
body {
  background: black;
}

p {
  color: white;
  text-align: center;
}

.copyright {
  font-size: 20px;
  text-align: center;
}
// 1. Traditional way of retrieving current year
var minutes = 1000 * 60;
var hours = minutes * 60;
var days = hours * 24;
var years = days * 365;
var d = new Date();
var t= d.getTime();

var y = "<br>" + "Copyright © ";
	y += Math.floor(t / years) + 1970;
// Javascript starts counter at 1970.
    document.getElementById("copyright").innerHTML = y;
   

// 2. The easier way of retrieving current year
var now = new Date();
var year = "<br>" + "Copyright © " + now.getFullYear();
document.getElementById("new-copyright").innerHTML = year;
Rerun