Skip to Content

Technology Blog

Technology Blog

Make sure you always have the current copyright year in your footer

Recently updated on

As Web developers we are sticklers for website details. That's why I always look at the copyright year, often found in the footer of a page.

Whenever I go to a website, my eyes go immediately to the year. You'd be surprised how many websites say 2018 or 2012 or even 1999. At best, is demonstrates little attention to detail and at worst it proclaims the site as abandoned.

At Imaginary, we have our site and our client sites set up so the copyright year updates at the stroke of midnight on January 1st, automatically.

We use the Django's built-in template tag to do the trick:

 Copyright © 1996-{% now "Y" %} Imaginary Landscape, LLC. All rights reserved.

This can also be done with an Apache SSI:

[!--#config timefmt="%Y" --]

Copyright © 1996- [!--#echo var="DATE_LOCAL" --] Imaginary Landscape, LLC. All rights reserved.

The two commands do the following tasks:

  • [!--#config timefmt="%Y" --]- until otherwise told, return a four digit year for any DATE requests
  • [!--#echo var="DATE_LOCAL" --]- show the local DATE

These simple snippets ask the local Web server every time a page is called, "Hey, what year is it?" Assuming the server is on the correct time, it will forever display the current year.

Share , ,
If you're getting even a smidge of value from this post, would you please take a sec and share it? It really does help.