Skip to content

Interval

A span of time between two ISO 8601 instant strings, half-open: [start, end).

import type { Interval } from "@northguild/gmt";
MemberTypeDescription
startstringThe first instant inside the interval, as an ISO 8601 instant string with an offset.
endstringThe first instant after the interval, as an ISO 8601 instant string with an offset; it is not itself inside. It may equal start, which makes the interval empty, but not precede it.
type Interval = {
/** The first instant inside the interval, as an ISO 8601 instant string with an offset. */
start: string;
/**
* The first instant after the interval, as an ISO 8601 instant string with an offset; it is
* not itself inside. It may equal `start`, which makes the interval empty, but not precede it.
*/
end: string;
};

types/interval.ts