We start by creating a variable that contains all the elements with the classname of 'year'
Then we go through each one and change its 'Inner HTML' to the text of the 'full current year' (eg. 2022).
The code can be pasted on any page's 'Before </body> tag' or on the site's settings 'Footer code'.
<script>
var yearElements = document.getElementsByClassName( 'year' );
[].slice.call(yearElements).forEach(function (div) {
div.innerHTML = new Date().getFullYear();
});
</script>
Destin's Youtube channel Smarter Every Day is one of my favourite places on the web.