public static function isDateString($value, $name)
    {
        self::isString($value, 'value');

        try {
            new \DateTime($value);

            return true;
        } catch (\Exception $e) {
            throw new \InvalidArgumentException(
                sprintf(
                    Resources::ERROR_INVALID_DATE_STRING,
                    $name,
                    $value
                )
            );
        }
    }