fixes "`year` is not defined"

Ah, yeah makes sense. I noticed this while scanning the code. Sorry for making a careless pr without looking more closely.