Hi, today am going to code a js snippet for dynamically updating the footer’s copyright year.
document.getElementById('copyrightYear').innerHTML = new Date().getFullYear();
Place the id (copyrightYear) in a span tag at the footer section after © symbol and before company name.
Place the above code in script tags at the bottom before closing body tag.
You will get the current year without any hassle to update it regularly every year.
If you like the post, share with your friends.