Update Your Copyright Date Automatically

Update Your Copyright Date Automatically

It’s a new year, and it’s time to get back to work.

So why do your websites still read © last year or worse?

Most web site owners forget to update their copyright date. And it’s easy to understand why. For most sites, the footer, where the copyright date usually sits, is below the fold and in small type anyways. But for site visitors, it can communicate the freshness of a website’s content. So it doesn’t hurt to make sure this information is updated.

You could do it manually, or like I did around the turn of the century, by using a “Find and Replace” feature of some web authoring tool. An even better way is to present the date dynamically, and yes, even if you’re not using a server side technology like PHP or ASP.

Below are code snippets in various languages to present the current year on a web page. Note that I’m using the © character attribute for displaying the copyright symbol (and so should you).

Javascript

This code can be used on any web page, including static HTML pages.
<script type="text/javascript">
var theDate=new Date()
document.write(theDate.getFullYear())
</script>

PHP

&copy;<?php echo date(Y);?>
or
&copy;<? echo date(Y);?>

ASP

&copy;<%=year(date)%>

Coldfusion

<cfoutput>&copy; #Year(Now())#</cfoutput>

Server Side Includes (SSI)

<!--#config timefmt="%Y" -->
<!--#echo var="date_LOCAL" -->

One comment

deconspray

As of Jan 3 at 12 noon, the following high-trafficked sites still displayed outdated copyright years:
– Linkedin.com
– Twitter.com
– Apple.com
– CNN.com
– MSNBC.com
– FOXNews.com
– MySpace.com
– YouTube.com
– FoodNetwork.com
– Amazon.com
– eBay.com
– 37signals.com (and all apps)
– jpmorganchase.com
– wellsfargo.com
– united.com
– orbitz.com
– delta.com

Oh and I guess I could go on forever. Needless to say, I’m not sure why these sites would just place a snippet of code to generate it dynamically and automatically.