Wouldn't it be nice to be able to scratch even one item off your New Year's webmaster checklist? Well, now you can! No more manual updating of the copyright years with this niftly little script.
Replace both sets of "xxxx" with the first year the website was published. I first published White Wave Designs in 2003, so my code looks like this:
Copyright © 2003
var d=new Date();
And the copyright in my footer looks like this: Copyright © 2003 .
What makes this script so convenient is that you can put it in a new site, and then forget about it! This line of code tells the browser to print the dash and the current year only if the original year is not the current year:
What it really means is:
if (this year is not equal to the first year)...
Copyright © 2003.
Not a bad price to pay for not having to worry about it anymore. So, put this on your sites and have one less thing to do on New Year's Day!
Questions? It's not working the way you thought it would? Like it? Please email me and let me know!