Copyright code

Monday 23 June 2008

For many of our clients it is important that their website looks up to date at all times. There are various items that can be added to a website to help with this, for example a regularly updated ‘latest news’ feed on the home page. However, one item that is often overlooked is the copyright date, which is rarely updated once a website goes live.

epiGenesys always adds an automatically updating copyright date, which means that if the copyright notice looks like this when the website goes live:

© 2008 epiGenesys

Then the following year it will automatically look like this:

© 2008-2009 epiGenesys

And the following year:

© 2008-2010 epiGenesys

The code required to implement an automatically updating copyright date is very simple, and is provided below for each of the key languages preferred by epiGenesys. For ASP.NET:

<p>&copy; 2008<% if (DateTime.Now.Year > 2008) { %>
-<%= DateTime.Now.Year.ToString() %><% } %>
<a href="http://www.epigenesys.co.uk">epiGenesys</a></p>

And for PHP:

<p>&copy; 2008<?php if (date('Y') > 2008)
echo "-".date('Y'); ?>
<a href="http://www.epigenesys.co.uk">epiGenesys</a></p>

And finally for Ruby on Rails:

<p>&copy; 2008<% if Time.now.year > 2008 %>
<%= '-' + Time.now.strftime("%Y") %><% end %>
<%= link_to 'epiGenesys', 'http://www.epigenesys.co.uk' %></p>

So that’s all there is to it. With a little touch like the above we can help to ensure that a website always looks current, without requiring any effort from the website owner.

Post a Comment