// NewTimeRange let's you create a new TimeRange from the time format "2006-01-02"
165366
func NewTimeRange(start, end string) TimeRange {
	tStart, err := time.Parse("2006-01-02", start)
	if err != nil {
		panic(`NewDate(string) requires format "2006-01-02"`)
	}

	tEnd, err := time.Parse("2006-01-02", end)
	if err != nil {
		panic(`NewDate(string) requires format "2006-01-02"`)
	}

	return TimeRange{tStart, tEnd}
}
75629
func (t *TSMReader) TombstoneRange(key []byte, buf []TimeRange) []TimeRange {
	t.mu.RLock()
	tr := t.index.TombstoneRange(key, buf)
	t.mu.RUnlock()
	return tr
}
1203262
func (s *SourceInfo) SetRange(start, end int64) error {
	if start > end || start < 0 {
		return ErrInvalidArgument("start must be non-negative, and start must be at most end.")
	}
	// Note that 0 <= start <= end
	s.start, s.end = start, end
	return nil
}
183819
func SecondInRange(t time.Time, minSecond, maxSecond int) bool {
	return (minSecond <= t.Second()) && (t.Second() <= maxSecond)
}
697377
func (tr Ranges) AddRange(r Range) Ranges {
	res := tr.clone()
	res.addRangeInPlace(r)
	return res
}
1162027
func (s *HLSFragmentSelector) SetTimestampRange(v *HLSTimestampRange) *HLSFragmentSelector {
	s.TimestampRange = v
	return s
}
577012
func NewTermRangeQuery(min, max string) *query.TermRangeQuery {
	return query.NewTermRangeQuery(min, max)
}
139596
func Int8Range(min, max int8) gopter.Gen {
	return Int64Range(int64(min), int64(max)).
		Map(int64To8).
		WithShrinker(Int8Shrinker).
		SuchThat(func(v int8) bool {
			return v >= min && v <= max
		})
}
236697
func (s *Scan) SetTimeRange(from time.Time, to time.Time) {
	if s.timeRange == nil {
		s.timeRange = &TimeRange{
			From: from,
			To:   to,
		}
	} else {
		s.timeRange.From = from
		s.timeRange.To = to
	}
}
892083
func NewTTLStore(keyFunc KeyFunc, ttl time.Duration) Store {
	return NewExpirationStore(keyFunc, &TTLPolicy{ttl, clock.RealClock{}})
}
1137968
func (d *Duration) InRange(min, max time.Duration) *Duration {
	if d.value == nil {
		d.chain.fail("expected duration is set, but it is not")
		return d
	}
	if !(*d.value >= min && *d.value <= max) {
		d.chain.fail(
			"\nexpected duration in range:\n min: %s\n max: %s\n\nbut got: %s",
			min, max, *d.value)
	}
	return d
}
802590
func TimeRange(after, before time.Time) QueryOpt {
	return QueryOpt{func(o *QueryOptions) {
		o.AfterDate = after
		o.BeforeDate = before
	}}
}
1084629
func NewTrueRange() (indicator *TrueRange, err error) {
	ind := TrueRange{}
	ind.TrueRangeWithoutStorage, err = NewTrueRangeWithoutStorage(func(dataItem float64, streamBarIndex int) {
		ind.Data = append(ind.Data, dataItem)
	})
	return &ind, err
}
556032
func NewTimeformatLogger(out io.Writer, timeFormat string) Logger {
	return &standardLogger{
		out:        out,
		timeFormat: timeFormat,
	}
}
1068946
func (s *ListDeploymentsInput) SetCreateTimeRange(v *TimeRange) *ListDeploymentsInput {
	s.CreateTimeRange = v
	return s
}
626828
func StringRange(min, max int, charset string) (string, error) {
	//
	// First determine the length of string to be generated
	//
	var err error      // Holds errors
	var strlen int     // Length of random string to generate
	var randstr string // Random string to return
	strlen, err = IntRange(min, max)
	if err != nil {
		return randstr, err
	}
	randstr, err = String(strlen, charset)
	if err != nil {
		return randstr, err
	}
	return randstr, nil
}
258519
func NewTimeoutCond(l sync.Locker) *TimeoutCond {
	cond := TimeoutCond{L: l, signal: make(chan int, 0)}
	return &cond
}