I have a copyright profile defined in IntelliJ as Copyright ${today.year}, All Rights Reserved.
This works great on new files, however on existing files I would like to update the existing year to a range or update the end-date of an existing range to ${today.year}
.
IntelliJ supports using Velocity in copyright templates. Is there a way to leverage Velocity to do this? From what I can tell, Velocity allows for if-statements yet I am unsure how to get the previous years as variables.
Examples:
New document: Copyright 2018
Copyright 2017
to Copyright 2017-2018
Copyright 2015-2017
to Copyright 2015-2018
Reference: