Fix date calculation logic
Merge pull request #81 from kenjis/fix_date

Fix date calculation logic