This Fixes #986

Linking this commit with PR #1076 in order to retain the comments.

@gordonwoodhull, I have changed the logic as per your suggestion.
I have added the logic for comparing each version with year so that year is shown for previous versions. 
I have tested the code by simulating the data. I couldn't get a notebook with last years activity.
It should work as expected. It will be great if you can share one with me which has history of last years.