fix date issues

fix #1
fix #6