Need someone to lead product or development at your software company? I lead product and engineering teams and I'm looking for my next opportunity. Check out my resume and get in touch.

Dynamic copyright

Freshness Warning
This blog post is over 13 years old. It's possible that the information you read below isn't current and the links no longer work.

Brad Feld wants to know if you’ve updated your copyright dates and suggests you put them in an include for update-once ease.

Most sites I’ve built take this a step further—the dates are dynamic. Copyright dates are often a range, and of course the first date doesn’t change. But the last date is always current with a dynamic copyright.

In Movable Type, you can use this...

&copy; 1996 - <MTDate format="%Y">

In PHP...

echo '&copy; 1996 - ' . date('Y');

And in Smarty...

&copy; 1996 - {$|date_format:"%Y"}

Dave Kaufman - Techlife
January 1, 2007 1:57 PM

Interesting and the dumb question.... in HTML? or if your Apache webserver has PHP and the page is .html can you use the PHP?

Adam Kalsey
January 1, 2007 2:01 PM

Only if your web server is set up to process .html pages as PHP. If you're using Apache, adding the following to your .htaccess file should do the trick (assuming that PHP is already set up on your server)... `AddType application/x-httpd-php .html` But don't do this lightly. There's performance and server load considerations to think about. This means that every .html page on your server will be processed for PHP, regardless of whether you actually put any PHP code in there.

January 21, 2007 11:37 AM

Very helpful notes on Apache and .htaccess...thanks Adam. Viv

This discussion has been closed.

Recently Written

Developer Relations as Developer Success (Oct 19)
Outreach, marketing, and developer evangelism are a part of Developer Relations. But the companies that are most successful with developers spend most of their time on something else.
Developer Experience Principle 6: Easy to Maintain (Oct 17)
Keeping your product Easy to Maintain will improve the lives of your team and your customers. It will help keep your docs up to date. Your SDKs and APIs will be released in sync. Your tooling and overall experience will shine.
Developer Experience Principle 5: Easy to Trust (Oct 9)
A developer building part of their business on your product needs to believe that you're going to do the right thing for them and their customers.
Developer Experience Principle 4: Easy to Get Help (Oct 8)
The faster you can unblock a stuck developer, the better their experience will be.
Developer Experience Principle 3: Easy to Build (Oct 5)
A product makes it Easy to Build by focusing on productivity for developers building real-world applications.
How to understand your product and your market (Sep 30)
A customer development question you can ask to find out who your product is best for and why they'll love it.
Developer Experience Principle 2: Easy to Use (Sep 28)
Making it Easy to Use means letting the developer do everything without involving you.
Developer Experience Principle 1: Easy to Understand (Sep 25)
To create a great developer experience, you must strive for a product that is Easy to Understand. Reduce the amount of thinking that someone needs to do. Make their first encounter with your product clear and easy.


What I'm Reading


Adam Kalsey

+1 916 600 2497


Public Key

© 1999-2020 Adam Kalsey.