Added intelligence to format dates correctly.