Display Current Year with Javascript

Wouldn’t it be nice to not have to manually update the copyright year, each and every new year, on your website? The following javascript will display the current year where utilized.



<script>var today = new Date(); document.write(today.getFullYear());</script>


If this article was helpful please take a moment to like us on Facebook, share this on your social media or buy us a cup of coffee.