I think I did more in comments than code. You'll be happy.

In short:
If the user doesn't specify a year, it will default to the last year
they looked at.
If they do specify a year, it will update the cookie and remember it
next time.