Fixed mistake in year calculation

Refactored previous commit
Merge pull request #3 from ohaal/master

Fixed mistake in year calculation