original_string: public function validate_iso_date($a)
      {
          $date = explode('-', $a);
  
          $msg = 'Must be date in format: YYYY-MMM-DD';
  
          if (count($date) != 3) {
              return $this->fail($msg);
          }
  
          if (strlen($date[0]) !== 4 || strlen($date[1]) !== 2 || strlen($date[2]) !== 2) {
              return $this->fail($msg);
          }
  
          if (!@checkdate($date[1], $date[2], $date[0])) {
              return $this->fail($msg);
          }
      }
code: public function validate_iso_date($a)
      {
          $date = explode('-', $a);
  
          $msg = 'Must be date in format: YYYY-MMM-DD';
  
          if (count($date) != 3) {
              return $this->fail($msg);
          }
  
          if (strlen($date[0]) !== 4 || strlen($date[1]) !== 2 || strlen($date[2]) !== 2) {
              return $this->fail($msg);
          }
  
          if (!@checkdate($date[1], $date[2], $date[0])) {
              return $this->fail($msg);
          }
      }
code_tokens: public function validate_iso_date ( $ a ) { $ date = explode ( '-' , $ a ) ; $ msg = 'Must be date in format: YYYY-MMM-DD' ; if ( count ( $ date ) != 3 ) { return $ this -> fail ( $ msg ) ; } if ( strlen ( $ date [ 0 ] ) !== 4 || strlen ( $ date [ 1 ] ) !== 2 || strlen ( $ date [ 2 ] ) !== 2 ) { return $ this -> fail ( $ msg ) ; } if ( ! @ checkdate ( $ date [ 1 ] , $ date [ 2 ] , $ date [ 0 ] ) ) { return $ this -> fail ( $ msg ) ; } }
docstring: Validate for ISO date in format YYYY-MM-DD.
  
  Also checks for valid month and day values
docstring_tokens: Validate for ISO date in format YYYY - MM - DD .