Code for dynamic copyright on website?

I need a code snippet (or if there's a "Drupal" way to do it) to put a copyright in our website footer.

Copyright 2013 - 2014

...where the 2014 will change on Jan. 1, to the next year.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan CraciunIT ConsultantCommented:
<?php echo "Copyright 2013 - ".date("Y"); ?>


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dan CraciunIT ConsultantCommented:
<p>Copyright 2013 - <script type="text/javascript">document.write(new Date().getFullYear())</script></p>
Aaron FeledyDrupal Developer and ConsultantCommented:
If you want to place Dan's php code in a block in Drupal, you'll need to enable the PHP filter module and select php code as the text format when creating the block.
While it is not a lot of extra overhead, it is still a waste to run script every time a page loads.  If the text is in an include file then all you need is a script that CRON runs once a year to change the year.  

Like I say, it is not a lot of overhead, but anything you do not actually need is BLOAT, and a if you add enough spoonfuls of water to a bucket; sooner or later it overflows.  Adding bloat just moves a page closer to unacceptable response time.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.