top of page

Automatically update the copyright year

If your website is still showing “© 2017” and it should be “© 2018” then take the opportunity to update once and have it correct forever using one of the code snippets below: Show current year in .NET

<%="&copy;" & DateTime.Now.Year %>

Show current year in ASP <% response.write ("&copy;" & Year(Now)) %>

Show current year in JavaScript

<SCRIPT LANGUAGE="JavaScript"> today=new Date(); cy=today.getFullYear(); document.write(‘&copy;’ + cy); </SCRIPT>

Show current year in PHP

1&copy; <?=date("Y") ?>

15 views0 comments

Recent Posts

See All


bottom of page