Clean up some date processing.