Complete function to get year in raster-appropriate format