PHP: Current Year

Every time I begin converting my designs to CMS-friendly PHP code, I always find myself trying to remember the best way to include the current year in copyright declarations for the footer. Of course it’s simple, and I always feel like an idiot when I eventually recall is.

So I’m putting it up here in the hopes that I won’t forget it in the future, and that others might be saved a trompe through some search listings. Without further adieu…

<?php echo( date( 'Y') ); ?>

Maybe now I’ll be able to remember this simple tidbit.

3 thoughts on “PHP: Current Year

  1. Can you post something a little shorter? I admit, I’m a lazy guy, and that much code is a bit much for my tired and lazy brain… 😛

  2. The tired and lazy brain is what makes me forget the simplest functionality all the time. Though that shouldn’t be a problem soon. I’m building a design framework template for WordPress which should make my life a lot easier.

Comments are closed.