Date bug corrected, fixes #327
Merge pull request #328 from markbrough/master

Fix bug with dates, fixes #327 - thx to @markbrough.