Flow Communications

It’s important to keep your website up to date by adding new, relevant content that will attract new users and keep your audience coming back for more.

Copyright C1 1

But web developers often miss changing a website’s copyright notice to reflect the current year. If your copyright notice says “2007”, it immediately tells the user that the site was built in 2007, and has not been looked at since!

If you use a PHP-based website, here’s a simple piece of code you can use to ensure your copyright never goes out of date:

<?php echo date('Y'); ?> 

The date function asks the server what the date and time is, and then extracts just the year (Y). Unless your server time is incorrect, you should always see the current year.

You can also use this function to display the current time on your website. See the date formatting reference for all the combinations.

Since many of our sites use ExpressionEngine, we can also use the current time template tag to achieve the same thing:

{current_time format="%Y"

It’s a simple line of code that can make a huge difference to your users’ perceptions of your website.

comments powered by Disqus