fix date math