Fix date calculation
Merge pull request #1 from jplitza/master

Fix date calculation