Automatically Print The Year On Your Website
Another year change coming up, are your websites ready?
If you currently change your website’s copyright date manually, here’s a bit of php code that will do it for you automatically (year displayed is based on your web server time):
<?php echo "© 2004 - ";
echo date("Y");?> SuperAff.com
Or:
© 2004 - <?=date("Y");?> SuperAff.com
Or:
© 2004 - <?php print date("Y")?> SuperAff.com
It will display on your website as:
© 2004 - 2005 SuperAff.com
Just change the start date (2004) to whatever year you like (or remove it if you prefer) and change SuperAff.com to your own domain name.
If you prefer a javascript method, here are a couple to try:
Willmaster.com - Javascript Print Year
No more running around at the beginning of the year updating your copyright dates ;).
Leave a Reply