Author: | jusleg |
---|---|
Views Total: | 436 views |
Official Page: | Go to website |
Last Update: | January 18, 2019 |
License: | MIT |
Preview:

Description:
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(); });