date math cleanup