Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Copyright Date

How To Automatically Keep Current



1:15 am on Mar 21, 2005 (gmt 0)

10+ Year Member

At the bottom of each of my web pages, I have a copyright and 2001 - 2005. Is there a script I can use instead of 2005 so that it will automatically change to the current year. This way when 2006 rolls around, I don't have to change each page.

I tried using Includes in a footer, but kept having problems because not all of my pages are PHP. I inherited this web site and don't have time to go back and make each page PHP and use includes footers. So I was hoping a simple script existed to show the current year.



2:14 am on Mar 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

If you are using a PHP include, I would consider using htaccess to parse your HTML files as php, and then use an include.


2:32 am on Mar 21, 2005 (gmt 0)

10+ Year Member

If you're using asp, just put DatePart("yyyy", Now) where you want the current year to appear.

Recommend not using Javascript -- the people that don't have jscript turned on (very few) will see 1997-(nothing) as will the spiders.


6:22 am on Mar 21, 2005 (gmt 0)

10+ Year Member

I do recommend using javascript in your case. Forget the few not having Javascript (not even 1.0) as for search engines why would you care for the copyright year?


6:36 am on Mar 21, 2005 (gmt 0)

10+ Year Member

Years ago, I did a graphic on a website for the copyright information. Once a year, I updated the graphic.


1:47 pm on Mar 21, 2005 (gmt 0)

10+ Year Member

I played around with several things and think the Javascript may work fine for me. Is this the simplest code?

<script type="text/javascript">
var theDate=new Date()


Featured Threads

Hot Threads This Week

Hot Threads This Month