Skip to content

LocalWindow

A daily window of local wall time, half-open: open from from up to (not including) to.

import type { LocalWindow } from "@northguild/gmt";
MemberTypeDescription
fromstringThe wall time the window opens, as an ISO PlainTime string ("09:00", "17:30:00") that isValidTime accepts.
tostringThe wall time the window closes, as an ISO PlainTime string; the window does not include it. A value after from keeps the window inside one local date. A value at or before from wraps past midnight into the next local date: { from: "23:00", to: "06:00" } is a night, and { from: "00:00", to: "00:00" } is a whole day.
type LocalWindow = {
/**
* The wall time the window opens, as an ISO PlainTime string (`"09:00"`, `"17:30:00"`) that
* `isValidTime` accepts.
*/
from: string;
/**
* The wall time the window closes, as an ISO PlainTime string; the window does not include it.
* A value after `from` keeps the window inside one local date. A value at or before `from`
* wraps past midnight into the next local date: `{ from: "23:00", to: "06:00" }` is a night,
* and `{ from: "00:00", to: "00:00" }` is a whole day.
*/
to: string;
};

types/operating-schedule.ts