Returns true if the second interval is entirely included in the first one
@param Interval $first
@param Interval $second
@return bool
962947
public function assert(Interval $first, Interval $second): bool
    {
        return $first->getStart()->greaterThan($second->getEnd());
    }
882000
public boolean contains(ChronoInterval<T> interval) {

        for (ChronoInterval<T> i : this.intervals) {
            if (i.equals(interval)) {
                return true;
            }
        }

        return false;

    }
492172
def is_valid_interval(interval):
    
    if not isinstance(interval, (int, long)):
        return False

    if interval <= 0:
        return False

    return True
1034863
public function isLte(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isLte($first->getAmount(), $second->getAmount());
    }
1037424
public function isConvergent ()
	{
		$is = true;
		for( $i=$this->interval->getStart(); $i<$this->interval->getEnd(); $i++ )
		{
			$an = $this->getPartialSum( $this->interval->getStart(), $i );
			$an1 = $this->getPartialSum( $this->interval->getStart(), $i+1 );
			$diff = abs( $an1 - $an );
//			echo "<br>an1: ".$an1." | an: ".$an." | diff: ".$diff;
			if (!$old_diff) $old_diff = $diff;
			else if( $diff >= $old_diff )
				$is = false;
		}
		return $is;
	}
1213216
public static function unitsAreDifferent($first, $second)
    {
        return
            (preg_match(UnitResolver::SI_PATTERN, $first) && preg_match(UnitResolver::IEC_PATTERN, $second)) ||
            (preg_match(UnitResolver::IEC_PATTERN, $first) && preg_match(UnitResolver::SI_PATTERN, $second));
    }
1296061
private int compareStarts(Interval<T> other){
		if (start == null && other.start == null)
			return 0;
		if (start == null)
			return -1;
		if (other.start == null)
			return 1;
		int compare = start.compareTo(other.start);
		if (compare != 0)
			return compare;
		if (isStartInclusive ^ other.isStartInclusive)
			return isStartInclusive ? -1 : 1;
		return 0;
	}
341735
public function withIntervalInMinutes($intervalInMinutes)
    {
        $this->validateInterval($intervalInMinutes);
        $this->interval = $intervalInMinutes;
        $this->intervalUnit = IntervalUnit::MINUTE;

        return $this;
    }
386133
public static function isValideTime($hour, $minute, $second) {
        return $hour >= 0 && $hour <= 24
        && $minute >= 0 && $minute <= 59
        && $second >= 0 && $second <= 59;
    }
962001
public function contains(Period $interval, Period ...$intervals): bool
    {
        $intervals[] = $interval;
        foreach ($intervals as $period) {
            if (false === $this->indexOf($period)) {
                return false;
            }
        }

        return true;
    }
377400
public static function areValuesSameType($firstVal, $secondVal)
    {
        $firstValType = gettype($firstVal);
        $secondValType = gettype($secondVal);
        $numberTypes = array('double', 'integer');

        if (in_array($firstValType, $numberTypes) && in_array($secondValType, $numberTypes)) {
            return true;
        }

        return $firstValType == $secondValType;
    }
48975
protected function expires( $first, $second )
	{
		return ( $first !== null ? ( $second !== null ? min( $first, $second ) : $first ) : $second );
	}
1341524
public Interval expand(Interval<E> other)
  {
    if (other == null) return this;
    E a = min(this.first, other.first);
    E b = max(this.second, other.second);
    return toInterval(a,b);
  }
673081
protected function _getInterval($interval) {
		if ($interval !== null) {
			return $interval;
		} elseif (!empty($this->params['interval'])) {
			return $this->params['interval'];
		} else {
			return '1 day';
		}
	}
826422
public function assert(Interval $first, Interval $second): bool
    {
        return
            $second->getStart()->greaterThanOrEqualTo($first->getStart()) &&
            $second->getEnd()->lessThanOrEqualTo($first->getEnd());
    }
459707
def contiguous(self, other: "Interval") -> bool:
        
        return not(self.end < other.start or self.start > other.end)
306103
public boolean contains(ChronoInterval<T> interval) {

        // trivial case
        if (interval.isEmpty()) {
            return false;
        }

        T low = interval.getStart().getTemporal();

        if ((low != null) && interval.getStart().isOpen()) {
            low = this.timeLine.stepForward(low);
        }

        List<ChronoInterval<T>> found = new ArrayList<>();
        this.findByEquals(interval, low, found, this.root);
        return !found.isEmpty();

    }