Like clockwork, people build lists of resolutions and things to do for the new year. Many of the folks with websites end up scrambling to change the copyright dates sometime in the afternoon before they go out New Years Eve, or they end up doing it while hungover the next day. What is worse is when those of us that use a template created by someone else don’t realize that the coder got lazy and just threw the year in, and we don’t end up fixing the mistake until a few days later.
What I don’t get is why the folks that make these templates don’t have the self-updating code in there already. If you took all that time to create a template for people to use, you would think you would make it easier on yourself and put the code in there. I can understand it if you charged for support and just wanted to drum up some business, but it just seems silly.
which gives you:
or if you want a range of dates and a little text
with that one it will give you
© 2001 – 2010 (company name) All Rights Reserved.
<?php echo Date(Y);?>
or for a range of dates
<?php $c="2009"; $d=date("Y"); if ($d==$c) echo "Copyright © $d"; else echo "Copyright © $c-$d"; ?>
this one will produce a single date for the first year, and then the date range afterwards.
or for the range of dates
< %response.write("Copyright 2001- "&Year(Date))%>
< % Dim yy yy = DatePart("yyyy",Now()) %>Copyright Â© 2001-< %=yy%>
Copyright © 2001-< %=Year(Date)%>
<!--#config timefmt="%Y" --><!--#echo var="DATE_LOCAL" -->
or make your copyright statement a file fragment that can be pulled in with a simple:
<!--#include virtual="/path/to/copyright" -->
Since not every site is the same, it helps to have this list on hand. You just need to remember to check for them in any new templates that you decide to use, and/or remember to put them in a site you make on your own. Also, do not forget to update any forms you have (especially the ones involving money).