New Year Means New Copyright Dates

by Donna Fontenot December 28th, 2007 

It's that time of year again when the new year means our sites need new copyright dates. If you still manually change the dates, this is your reminder to do so once the new year rolls around. If you'd rather not have to remember each year, you should probably switch over to some sort of dynamic method. I'm going to make an assumption here that your site uses PHP, and give you some PHP code that will automatically supply the current year in your copyright date. To output the current date using PHP, simply use the following line of code in place of your current copyright year:

which will simply output the current year, such as 2007.

You can put any normal text before or after that, so let's say you wanted the copyright line to show the copyright symbol followed by a span of years starting with 2005. You would then use:

© 2005-

which will output © 2005-2007

Wait, what? Your site doesn't use PHP or any other language except HTML, you say? That's ok. If you'd like, you can tell your server to process all HTML pages as if they were PHP pages, without changing the filenames or extensions. As long as you have access to your .htaccess file, just add this line to it:

AddHandler application/x-httpd-php .html .htm .php

Now all your .html pages will be processed (parsed) as .php pages, and the code listed above can be added to them with no problems.

Note: Parsing .html pages as .php pages means a bit more processing time added to the page load, but generally speaking, it will likely be completely unnoticeable. Still, it's something to consider first.

You May Also Like

6 Responses to “New Year Means New Copyright Dates”

  1. Dave Dugdale says:

    Wait I thought you were a Coldfusion gal. What is up with the PHP?

  2. DazzlinDonna says:

    1. Most people use PHP, so that seemed to be the best thing to share.

    2. I'm getting away from CF and moving to PHP.

  3. g1smd says:

    By having a copyright date of 1996 on the page, for content written in 1996, you are showing you have had copyright on that information since that time.

    If you amend that date to 2008, you are no longer showing prior ownership of that information. I would only add the new date to new or amended content.

  4. DazzlinDonna says:

    Right, I assumed that was obvious, hence, my example of 2005-2007. Obviously, you'd only want to replace the 2007 with the code for the current year.

  5. Dave Dugdale says:

    ah, I am little hurt to hear you are moving away from Coldfusion.

    Although, I will admit that I do a little PHP myself from time to time.

  6. Nathan L says:

    I've been using Dreamweaver "Find and Replace" to all the files. I'll have to think about using PHP. I'm such a newbie at it its not funny