Automatic Copyright Date Update Script for PHP, ASP, and Javascript

Posted Tuesday, Feb. 5th 2008 at 2:18 am by Jason Hendricks

It’s a new year, and with that comes the annoying task of updating the copyright dates in the footer of all of your sites.

So this year make a resolution to never, ever do this again and just insert some code to handle the date for you. Examples in a few different languages are included below as well as a javascript version for static HTML pages:

PHP
Just copy, paste, and change the beginning year (shown as 2001)

OR

Just copy, paste, and change the beginning year (shown as 2001)

ASP
Just copy, paste, and change the beginning year (shown as 2001)

OR

Just copy, paste, and change the beginning year (shown as 2001)

OR

Just copy, paste, and change the beginning year (shown as 2001)

ASP.NET (C#)
Just copy, paste, and change the beginning year (shown as 2001)

Javascript
Just copy, paste, and change the beginning year & company name

OR

Just copy, paste, and change the beginning year (shown as 2001)

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Add to favorites
  • Yahoo! Bookmarks
  • BlinkList
  • blogmarks
  • email
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • NewsVine
  • RSS
  • StumbleUpon
  • Twitter
  • Yahoo! Buzz
  • Technorati

4 comments ↓

#1 Emil on Thursday, Mar. 12th 2009 at 1:51 pm

Hi,

How can I get Copyright 1995 – 03/12/2009, full date instead of just year?

Thanks in advance,
Emil

#2 Code that Caters to Your Laziness | The Simian Downtime Analyst on Tuesday, Jan. 5th 2010 at 3:33 pm

[...] or for the range of dates [...]

#3 Dom on Thursday, Jan. 7th 2010 at 12:12 pm

This is great! Thank you

#4 Code that Caters to Your Laziness on Sunday, Feb. 13th 2011 at 3:54 pm

[...] or for the range of dates [...]

Leave a Comment