InstantInterval
const InstantInterval: BoundIntervalType<Instant>;Defined in: interval-temporal.ts:177
Interval over Temporal.Instant (instantDomain, continuous, ms).
Example
Section titled “Example”import { Temporal } from "@js-temporal/polyfill";import { InstantInterval } from "@xtandard/lib/temporal";
const hour = InstantInterval.closedOpen( Temporal.Instant.from("2025-01-01T00:00:00Z"), Temporal.Instant.from("2025-01-01T01:00:00Z"),);hour.contains(Temporal.Instant.from("2025-01-01T00:30:00Z")); // truehour.length(); // 3600000 (ms)hour.middle()?.toString(); // "2025-01-01T00:30:00Z"