Returns a new interval based on this interval but with a different start
and end time.

@param startTime the new start time
@param endTime the new end time
@return a new interval
161919
public Interval withTimes(LocalTime startTime, LocalTime endTime) {
        requireNonNull(startTime);
        requireNonNull(endTime);
        return new Interval(this.startDate, startTime, this.endDate, endTime, this.zoneId);
    }
748363
public static RubyRange<LocalDateTime> range(LocalDateTime start,
      LocalDateTime end) {
    return new RubyRange<>(LocalDateTimeSuccessor.getInstance(), start, end,
        Interval.CLOSED);
  }
1224210
public static MomentInterval until(Moment end) {

        Boundary<Moment> past = Boundary.infinitePast();
        return new MomentInterval(past, Boundary.of(OPEN, end));

    }
42844
private function between(\DateTime $time, DateTimeFormatInterface $start, DateTimeFormatInterface $end)
    {
        return $this->after($time, $start) && $this->before($time, $end);
    }
1090271
@Override
    public DateInterval between(
        Boundary<PlainDate> start,
        Boundary<PlainDate> end
    ) {

        return new DateInterval(start, end);

    }
1050846
public Interval withEndDate(LocalDate date) {
        requireNonNull(date);
        return new Interval(startDate, startTime, date, endTime, zoneId);
    }
1182956
@Override
    public ClockInterval between(
        Boundary<PlainTime> start,
        Boundary<PlainTime> end
    ) {

        return new ClockInterval(start, end);

    }
286319
public Interval withDates(LocalDate startDate, LocalDate endDate) {
        requireNonNull(startDate);
        requireNonNull(endDate);
        return new Interval(startDate, this.startTime, endDate, this.endTime, this.zoneId);
    }
137101
public final boolean between(@Nonnull UtcTime begin, @Nonnull UtcTime end) {
    return (time >= begin.time) && (time <= end.time);
  }
604456
public static RubyRange<Date> range(Date start, Date end) {
    return new RubyRange<>(DateSuccessor.getInstance(), start, end,
        Interval.CLOSED);
  }
754180
public StructuredQueryBuilder.Period period(Calendar start, Calendar end) {
    return new TemporalPeriod(DatatypeConverter.printDateTime(start),
      DatatypeConverter.printDateTime(end));
  }
929807
@Override
    public MomentInterval between(
        Boundary<Moment> start,
        Boundary<Moment> end
    ) {

        return new MomentInterval(start, end);

    }
182037
public static DateInterval since(PlainDate start) {

        Boundary<PlainDate> future = Boundary.infiniteFuture();
        return new DateInterval(Boundary.of(CLOSED, start), future);

    }
1196746
public static function fromString($startTime, $endTime)
    {
        return new self(Time::fromString($startTime), Time::fromString($endTime));
    }
663762
public final Interval bucket(DateTime t)
  {
    DateTime start = bucketStart(t);
    return new Interval(start, increment(start));
  }
413005
public static <W extends Window> AfterFirstElementPeriodic<W> every(Duration time) {
		return new AfterFirstElementPeriodic<>(time.toMillis());
	}
36594
public static SimpleInterval<Date> between(
        Date start,
        Date end
    ) {

        return OLD_DATE_FACTORY.between(start, end);

    }