New Year’s Resolutions: Update your Copyright Notices

New Year’s Resolutions: Update your Copyright Notices

happy_new_yearOnly a few days left until we celebrate the new year. Champagne, parties, fireworks and yes, new years resolutions.

One thing that is on a lot of web professionals todo lists is to update their ‘Copyright’ notices. Or at least it should be.

A lot of websites take hours, days or even years to update. Google generally takes up to 48 hours to update all their footers but it is not unlikely to find “Copyright 2006” on some websites even today.

So why not automate the whole thing like we did for our blog? A few lines of code are enough to just print the year there. As long as your server’s internal clock is on time you will always display the current year.

Since you are going into code anyway you might as well change that “2009” to one of the dynamic code snippets below and you will be forever up-to-date:

< ?php print date(“Y”); ?>

< %response.write(“Current Year: “&Year(Date))%>

< %Response.Write(System.DateTime.Now.Year.ToString());%>

<script type=”text/javascript”>
var currentTime = new Date()
var year = currentTime.getFullYear()

Any other code snippets that are useful?
Let me know in the comments so I can add them.

@redfeet: @Boris Asp.Net: <%=Now.Year.toString%> Classic ASP: <%=Year(Date())%>
all the best for the 10

Read next: Amazon's Kindle has a HUGE Christmas but is it its last?