Currently I'm using:
Here's the shortest I can get it:
That will work in all browsers I've run across.
How I got there:
getFullYeardirectly on the newly-created
Date, no need for a variable.
new Date().getFullYear()may look a bit odd, but it's reliable: the
new Date()part is done first, then the