DEV Community

Tony Morris
Tony Morris

Posted on

Don't You Dare Update That Copyright Manually

A quick reminder for developers: now that we're in a new year, if you update your copyright to manually be "2019" there's almost certainly a spot for you in hell. Don't kick this down the road--solve the problem forever with something like DateTime.UtcNow.Year (or whatever your language of choice does for current year).

I just approved a ticket that changes 2016-2018 to 2016-{DateTime.UtcNow.Year} because there were three separate pull requests in the past that didn't address this. Now, barring any systemic changes to how .NET calculates the current UTC DateTime, we will never have to update this again.

July 12, 2016

2016 Change

February 16, 2017

2017 Change

July 13, 2018

2018 Change

January 17, 2019

2019 Change

Top comments (2)

Collapse
 
somedood profile image
Basti Ortiz

I have always wondered myself why people usually never set the copyright date dynamically.

Collapse
 
justinjstark profile image
Justin J Stark • Edited

Our legal team at a large enterprise firm would not allow us to set the date automatically. I am not a lawyer and don't know their reasoning. There is a lot of debate about whether the copyright notice and/or date is even required. Historically the copyright year in a notice was the publish date. This was useful evidence to prove your work was published before that of an infringer. As the web allows us to constantly revise our content and even provide it dynamically, the copyright year has lost its meaning. At the end of the day, under current law, your work is inherently copyrighted the moment you create it. But given the historical reasoning for adding a year to the copyright notice, it seems adding the year to the copyright is detrimental. If your content is static, you can add the copyright to the date the page content was published. Otherwise, I lean toward leaving the year out of the notice, or omitting the copyright notice entirely.