original_string: public static function isValidDate($date, $format = 'Y-m-d H:i:s')
      {
          $d = DateTime::createFromFormat($format, $date);
  
          return $d && $d->format($format) === $date;
      }
code: public static function isValidDate($date, $format = 'Y-m-d H:i:s')
      {
          $d = DateTime::createFromFormat($format, $date);
  
          return $d && $d->format($format) === $date;
      }
code_tokens: public static function isValidDate ( $ date , $ format = 'Y-m-d H:i:s' ) { $ d = DateTime :: createFromFormat ( $ format , $ date ) ; return $ d && $ d -> format ( $ format ) === $ date ; }
docstring: Check valid date time format
  @param string $date
  @param string $format
  @return bool
docstring_tokens: Check valid date time format