protected function comparision($function, array $arguments)
    {
        $args = [];

        foreach ($arguments as $argument)
        {
            if ($argument instanceof Date)
            {
                $args[] = $argument->gregorian;
            }
            elseif ($argument instanceof Carbon)
            {
                $args[] = $argument;
            }
            else
            {
                throw new InvalidArgumentException(
                    sprintf("date must be instance of %s or %s", Carbon::class, static::class)
                );
            }
        }

        return $this->date->{$function}(...$args);
    }
protected function comparision($function, array $arguments)
    {
        $args = [];

        foreach ($arguments as $argument)
        {
            if ($argument instanceof Date)
            {
                $args[] = $argument->gregorian;
            }
            elseif ($argument instanceof Carbon)
            {
                $args[] = $argument;
            }
            else
            {
                throw new InvalidArgumentException(
                    sprintf("date must be instance of %s or %s", Carbon::class, static::class)
                );
            }
        }

        return $this->date->{$function}(...$args);
    }
protected function comparision ( $ function , array $ arguments ) { $ args = [ ] ; foreach ( $ arguments as $ argument ) { if ( $ argument instanceof Date ) { $ args [ ] = $ argument -> gregorian ; } elseif ( $ argument instanceof Carbon ) { $ args [ ] = $ argument ; } else { throw new InvalidArgumentException ( sprintf ( "date must be instance of %s or %s" , Carbon :: class , static :: class ) ) ; } } return $ this -> date -> { $ function } ( ... $ args ) ; }
simulate Comparision function od Carbon class

@param string $function
@param array  $arguments
simulate Comparision function od Carbon class