Proposed fix for date type

Please see #7