Automatically Print The Year On Your Website

Another year change coming up, are your websites ready?

If you currently change your website’s copyright date manually, here’s a bit of php code that will do it for you automatically (year displayed is based on your web server time):

<?php echo "&copy; 2004 - ";
echo date("Y");?>


&copy; 2004 - <?=date("Y");?>


&copy; 2004 - <?php print date("Y")?>

It will display on your website as:

© 2004 – 2005

Just change the start date (2004) to whatever year you like (or remove it if you prefer) and change to your own domain name.

If you prefer a javascript method, here are a couple to try: – Javascript Print Year

No more running around at the beginning of the year updating your copyright dates ;).


I've been trying to find my way online for more years than I care to admit.