Future proof your footer's copyright date with the current year

michael profile image Michael Lee πŸ• ・1 min read

It's a new year and one of the quickest ways for your site to seem dated is by not updating the copyright year in the footer.

To combat this, the easiest way is to have your site generate the current year for you.

Here are a few code snippets in a few select languages.


<script type="text/javascript">
  document.write(new Date().getFullYear());


<%= Time.now.year %>


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


// You'd most likely want to create a component to handle this. In the component's JS file, create a property like `currentYear`
currentYear: new Date().getFullYear(),
// Then in your component's handlebars file, reference the property like this.
<footer>&copy; 2014 - {{currentYear}}</footer>


Future proofing a Jekyll project's copyright is a little more manual, but here are step by step instructions on future-proofing your Jekyll copyright date.

If you have any other examples, feel free to leave it in a comment and I'll update this post.

Originally posted on Michael Lee


Editor guide
martingbrown profile image
Martin G. Brown

Of course doing this will make the copyright date incorrect in a lot of cases. To change the copyright date you need to change the published work as well. And as I understand it, you should add a year when you make a revision, not replace the year (eg Copyright "1990, 2005 and 2018"). But I'm not a lawyer so what do I know?

michael profile image
Michael Lee πŸ• Author

Even though you aren't a lawyer, thanks for bringing this up Martin! Made me research and look into it more. Left some thoughts in a different comment based on your comment. Would love to dialogue and come to a better solution.

twistacz profile image
Michal HatΓ‘k

Isn't purpose of copyright to date when the website was created?

More likely you can replace "Copyright" with "Current Year" then.

arthurwhite profile image
chiangs profile image
Stephen E. Chiang

I've read that if it's static content (such as an article or blog post), it should probably be statically copyrighted.

If it's dynamically generated content, it should be copyrighted to the current year.

With that logic assumption, and also modern-day copyright laws, isn't it enough to:

a) leave the copyright off altogether


b) dynamically copyright the footer of the site, then let the post date (or explicitly put static copyright dates) of static content like a portfolio item or blog content be the reference of copyright year?

Someone who has studied this from a legal perspective on this site should post an article :)

kitsunde profile image
Kit Sunde

Copyright is automatic in the act of creation and has been so for as long as the Internet has exited, in America or otherwise. You never have to claim copyright, and you can't copy people's work without permission wether they expressively have claimed copyright or not. It's to the point that in a lot of countries (like Germany) you can't even disown copyright and put it in the public domain but have to assign it a liberal license instead.

When Google first launched because the homepage was so simple people were still waiting for it to finish loading when it was done. So they added a copyright notice as an indication to people that the load is complete, not for any sort of legal need and Google today don't have the notice anymore. As told Marisa Mayer by cnet.com/news/were-all-guinea-pigs...

Thread Thread
chiangs profile image
Stephen E. Chiang

Awesome, thanks!

michael profile image
Michael Lee πŸ• Author

Thanks Stephen! I hadn't done much research into this prior to the comments posted here. Really good suggestions here. I really like leaving off the copyright altogether...it seems Google does this and CSS Tricks does it as well.

I can think of a way to do what you had suggested with method b) for static generators since all files have the date in which it was created in the file name and written in the front matter.

Would love your thoughts and would love to update this article based on some feedback on what the best way to handle copyright for a site.

michael profile image
Michael Lee πŸ• Author

Thanks @martingbrown @twistacz @chiangs for bringing this up. Really hadn't thought about it in that way. Always was an aesthetic thing for me vs. the legal implications.

From what I've gathered here and here it seems ya'll are right in that copyright should be for the year in which the body of work was created.

Copyright seems to be automatically implied at the time of creation of said work. But it seems to take any legal action, copyright should be registered with the US Copyright Office first.

Since copyright is implied it seems some folks leave it off altogether.

Another solution seems to be to have a range of years for the copyright. So for example if site was first published in 1990, I've seen Copyright Β© 1990 - 2018.

I'm actually not sure how to take this article now. Would love to update it to be better informative to the community, but unsure what to suggest. Is there a common method of how to handle copyright information for a website? What do ya'll think?

jselbie profile image
John Selbie

C or C++ (preprocessor) DATE_YEAR is macro that resolves to an ascii string for the current year in which the code was compiled.

#define DATE_YEAR (__DATE__ + sizeof(__DATE__) - 5)

cout << "Copyright " << DATE_YEAR << " Foobar Inc. All rights reserved.";

printf("Copyright %s Foobar Inc. All rights reserved.", DATE_YEAR);

victoria profile image
Victoria Drake

Hugo sites:

{{ now.Format "2006" }}

Since the static site generator will update this when the site is built (not rendered), the copyright year is always accurate. :)

+1 for static!

samsonasik profile image
Abdul Malik Ikhsan

jsp should be :

<%= Calendar.getInstance().get(Calendar.YEAR) %>
externconst profile image
Alex Figueroa

I believe the jeyll-copright url is a dead link: "dev.to/michael/%7B%7B%20site.baseu..."

michael profile image
Michael Lee πŸ• Author

Thanks @ajfigueroa for letting me know. I've fixed it :)