The shortest way to print the current year on an HTML page is:
<script>document.write(new Date().getFullYear())</script>