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.
change confusing variable name

@agrawal-mohit, just changing *_diff to *_same because the variable
name made it sound like it meant the opposite

also, please watch out for trailing whitespace and missing semicolons
(jshint will catch some of these kinds of problems)
Merge branch 'pr/1087' into develop