Tempo API
    Preparing search index...

    Class Interval<T>

    Represents a continuous span of time with optional start and end boundaries, supporting set operations.

    Type Parameters

    • T extends TemporalPoint = TemporalPoint
    Index
    • Type Parameters

      • T extends unknown = any

      Parameters

      • start: T | null
      • end: T | null

      Returns Interval<T>

    • get end(): T | null

      The end point of the interval, or null for unbounded end

      Returns T | null

    • get endNs(): number | bigint

      The end time in nanoseconds since epoch, or Infinity for unbounded end

      Returns number | bigint

    • get start(): T | null

      The start point of the interval, or null for unbounded start

      Returns T | null

    • get startNs(): number | bigint

      The start time in nanoseconds since epoch, or -Infinity for unbounded start

      Returns number | bigint

    • Returns true if this interval starts exactly when the other ends, or vice versa

      Parameters

      Returns boolean

    • Returns true if the specified temporal point is within this interval

      Parameters

      • point: any

      Returns boolean

    • Returns the intersection of this interval and another, or null if they do not overlap

      Type Parameters

      • U extends unknown = T

      Parameters

      Returns Interval<T | U> | null

    • Returns true if this interval overlaps with another interval

      Parameters

      Returns boolean

    • Returns the union of this interval and another, or null if they do not overlap/abut

      Type Parameters

      • U extends unknown = T

      Parameters

      Returns Interval<T | U> | null