Skip to content

CutoffOptions

  • Legs, dwell, cut-offs and punctuality, shared by road, rail, sea and air.

Options for cutoffAt.

import type { CutoffOptions } from "@northguild/gmt";
MemberTypeDescription
timeZonestringThe time zone the cut-off is read in, the terminal’s clock: an IANA name or a UTC offset to the minute (what isValidTimeZone accepts).
atLocalTime?stringThe local time of day the cut-off is pinned to ("17:00"), as isValidTime accepts.
calendar?BusinessCalendarThe working week and holidays the cut-off’s local date is rolled against. Its timeZone is not read: timeZone above is the local frame. Requires roll.
roll?"following" | "modifiedFollowing" | "preceding" | "modifiedPreceding" | "endOfMonth" | "none" (RollConvention)How a cut-off on a non-business day moves, as rollDate moves it. Requires calendar.
interface CutoffOptions {
/**
* The time zone the cut-off is read in, the terminal's clock: an IANA name or a UTC offset to the
* minute (what `isValidTimeZone` accepts).
*/
timeZone: string;
/**
* The local time of day the cut-off is pinned to (`"17:00"`), as `isValidTime` accepts.
*
* @defaultValue None. The cut-off is the offset taken off the anchor, with no time of day
* pinned.
*/
atLocalTime?: string;
/**
* The working week and holidays the cut-off's local date is rolled against. Its `timeZone` is
* not read: `timeZone` above is the local frame. Requires `roll`.
*
* @defaultValue None. The cut-off's date is not rolled; a `roll` without it returns `""`.
*/
calendar?: BusinessCalendar;
/**
* How a cut-off on a non-business day moves, as `rollDate` moves it. Requires `calendar`.
*
* @defaultValue None. The cut-off's date is not rolled; a `calendar` without it returns `""`.
*/
roll?: RollConvention;
}

transport/calculate/cutoffAt.ts