Don't forget to update your sites copyright for the new year. One of the easiest ways to do this is include the code Copyright © your start year – <?php echo date(‘Y’); ?> and then you will never have to worry about it again. Sincerely, IamNTB
Or, via Javascript if you don't use PHP: <script language = 'JavaScript'> <!-- function y2k(number) { return (number < 1000) ? number + 1900 : number; } var today = new Date(); var year = y2k(today.getYear()); document.write('Copyright © '+year+' mysite.com - All Rights Reserved'); //--> </script> Code (markup):
Using JS to do this is a bad practice. It would be better to do it manually with HTML because the JS relies on the local machine. Personally, I just use PHP the same way imntb posted it.
I would have to agree. Although it can be done easily enough with JS. It would be neater, easier in the code and quicker to load as PHP.