As an alternative to updating the date dynamically, through server-side scripting, this is a method to change the date dynamically using jQuery. I wouldnt recommend using this unless you cant use a server-side language because, even though it works, its won’t be 100% accurate to the current date if the computer your on is wrong. Also, make sure you are loading jQuery when using this code or it won’t work correctly.

Add this jQuery in the head of your web page:

var currentYear = (new Date).getFullYear();
$(document).ready(function() {
$("#year").text( (new Date).getFullYear() );

Add this text where you want the current year to show:

<pre class="brush: html"><span id="year">2012</span></pre>