Edit in JSFiddle

document.getElementById('divCurrentYear').innerHTML = new Date().getFullYear();
<div id="divCurrentYear"></div>