Added DOM to challenge.php.
Fixed issues in date processing.