
The simplest way to automatically update the copyright year in your website’s footer section using the Date.prototype.getFullYear() API.
How to use it:
Wrap the copyright year in an element.
<span id="updateYourYearPLZ"></span>
The main JavaScript to auto update the copyright year.
document.addEventListener('DOMContentLoaded', function () {
document.getElementById("updateYourYearPLZ").innerHTML = new Date().getFullYear();
});







