protected function convert_to_date_time( $value ) {

		if ( $value instanceof \DateTimeInterface ) {
			return $value;
		}

		switch ( gettype( $value ) ) {
			case 'string' :
				return $this->convert_string( $value );
			case 'integer' :
				return $this->convert_integer( $value );
			case 'double' :
				return $this->convert_double( $value );
			case 'array' :
				return $this->convert_array( $value );
		}

		$this->error_code = Error\ErrorLoggerInterface::INVALID_TYPE_NON_DATE;

		return FALSE;
	}
protected function convert_to_date_time( $value ) {

		if ( $value instanceof \DateTimeInterface ) {
			return $value;
		}

		switch ( gettype( $value ) ) {
			case 'string' :
				return $this->convert_string( $value );
			case 'integer' :
				return $this->convert_integer( $value );
			case 'double' :
				return $this->convert_double( $value );
			case 'array' :
				return $this->convert_array( $value );
		}

		$this->error_code = Error\ErrorLoggerInterface::INVALID_TYPE_NON_DATE;

		return FALSE;
	}
protected function convert_to_date_time ( $ value ) { if ( $ value instanceof \ DateTimeInterface ) { return $ value ; } switch ( gettype ( $ value ) ) { case 'string' : return $ this -> convert_string ( $ value ) ; case 'integer' : return $ this -> convert_integer ( $ value ) ; case 'double' : return $ this -> convert_double ( $ value ) ; case 'array' : return $ this -> convert_array ( $ value ) ; } $ this -> error_code = Error \ ErrorLoggerInterface :: INVALID_TYPE_NON_DATE ; return FALSE ; }
Attempts to convert an int, string, or array to a DateTime object.

@param  string|int|array $value

@return bool|\DateTime
Attempts to convert an int string or array to a DateTime object .