/*
* Copyright (C) [create year]-[lm year] [name]
*
* [license header]
*/
Where the parts in brackets are the following:
- create year - The year in which the file was created.
- lm year - The year in which the file was last updated. Optional, sometimes only the create year is stated.
- name - The copyright holder identifier. The one I usually use for myself depends on the file context and has also changed over time:
- ~ 2021 and earlier:
user94729 (https://omegazero.org/) and contributors - ~ 2021 to 2022:
omegazero.orgoromegazero.org, user94729oruser94729 - ~ 2023 to 2024:
user94729 / warp03orwarp03 - ~ 2024 and later:
Wilton Arthur PothorWilton A. P.(my real name)
Sometimes the identifier is updated without changing either timestamp, and vice versa.
- license header - The header or a short summary of the file license. I usually use one of the following:
- Mozilla Public License 2.0: for pretty much all open-source projects. Uses the official license header. Before 2021, I also added a short section of the license text itself.
- MIT License: public example code for my libraries (there isn't much, unfortunately)
- No license (marked with "All rights reserved."): software which is not open source or only with published source code for demonstration. Regular copyright protection applies without any liberties given by open source licenses.
- If "Preliminary license status." is included in the license text, this means that the license used may be changed to a more liberal one in the future.
Sometimes some or all of the following apply:
- ... the first line ends with a
!to prevent deletion of the comment by minifiers. - ... the license text is preceded by auto-generated comments or other text or control structures.
- ... the comment syntax is different.
Example:
/*
* Copyright (C) 2024 Wilton Arthur Poth
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
Special cases:
-
Transferred rights (Switzerland): Under Swiss law, the copyright (Urheberrecht) can be transferred among living entities¹ [URG Art 16 S 1]. In this case, the copyright name will be identifying the entity where rights have been transferred to, through a contract or agreement. Immediately below will be a line indicating the original author or authors of the file; it is prohibited to remove or make changes (except additions) to the listed authors without their permission [URG Art 9 S 1] [3] [4] [5] [6]. By default, no license is applied ("All rights reserved."), unless one was chosen by the rights owner.
¹As opposed to, for example, Germany, where it can only be transferred through inheritance [§ 29 UrhG S 1]. Although there, 'usage rights' (Nutzungsrechte) can still be transferred [§ 31 UrhG], and that comes very close to the legal situation in Switzerland, as far as I understand. So basically, the difference is that according to German law, the 'copyright' (Urheberrecht) cannot be transferred, so the original creator can still call themselves the 'copyright holder', even though all effective rights (Nutzungsrechte) were transferred to another party. With translations to English, terminology becomes even more unclear and ambiguous.
This is not legal advice, I am not a lawyer nor a law student.