All you need to do is locate the line in your footer that looks like:
<footer>copyright © 2009</footer>and replace the year with a
<footer>copyright © <span id="year"></span></footer>And add this script tag to the end of the page:
<script> document.getElementById('year').textContent = (new Date()).getFullYear(); </script>Even easier: if your site is using jQuery, add this to the
$('#year').text((new Date()).getFullYear());This way, your copyright message will always show the current year. Keeping your content fresh? Well, that’s up to you .
Here's a shorter way to achieve the same effect, with one line:
<footer>copyright © <script>document.write((new Date()).getFullYear());</script></footer>
[This way is also more efficient, since no DOM selection is taking place].