Added code to handle malformed dates