Skip to content

unix/interval

  • intervalAbutsUnix: Return true when two half-open Unix intervals [start, end) are exactly adjacent — one ends where the other starts, so they share no value and leave no gap (Allen’s “meets”, either order).
  • intervalContainsUnix: Return true when pointOrStart falls within the half-open interval [intervalStart, intervalEnd) (3-arg), or when the inner interval [innerStart, innerEnd) lies within the outer interval [intervalStart, intervalEnd) (4-arg).
  • intervalCountUnix: Count how many unit boundaries a Unix epoch interval crosses.
  • intervalDifferenceUnix: Return the portion(s) of the half-open interval A [aStart, aEnd) not covered by the half-open interval B [bStart, bEnd).
  • intervalDivideEquallyUnix: Split a Unix epoch interval into n equal-length sub-intervals.
  • intervalEngulfsUnix: Return true when the half-open interval B [bStart, bEnd) lies within the half-open interval A [aStart, aEnd) — every instant of B falls within A.
  • intervalFromDurationUnix: Construct a Unix epoch interval from a single point plus an ISO 8601 duration, anchored at either end.
  • intervalIntersectionUnix: Return the overlapping span of two half-open Unix epoch intervals [start, end), or null when they do not overlap.
  • intervalLengthUnix: Return the exact length of a Unix epoch interval in unit, as a real (possibly fractional) number.
  • intervalOverlappingDaysUnix: Return how many distinct calendar dates two Unix epoch intervals share, in a given time zone.
  • intervalsOverlapUnix: Return true when the half-open intervals [aStart, aEnd) and [bStart, bEnd) share at least one instant.
  • intervalSplitAtUnix: Split a Unix epoch interval at arbitrary points, producing consecutive sub-intervals.
  • intervalUnionUnix: Return the combined span of two half-open Unix epoch intervals [start, end), or null when their union is not one non-empty span.
  • intervalXorAllUnix: Return the symmetric difference across a list of Unix epoch intervals — the set of epoch values covered by an odd number of the input intervals.
  • intervalXorUnix: Return the symmetric difference of two half-open Unix intervals [start, end) — the values covered by exactly one interval.
  • isValidUnixInterval: Return true if start and end form a valid Unix interval — both safe-integer epochs and start <= end.
  • mergeIntervalsUnix: Collapse a list of Unix epoch intervals into the minimum set of non-overlapping intervals.
  • splitIntervalByUnitUnix: Split a Unix epoch interval into sub-intervals of amount × unit.