Skip to content

DutyEntry

One status held over a half-open span of time, [start, end): one line of a duty log.

import type { DutyEntry } from "@northguild/gmt";
MemberTypeDescription
statusSThe caller’s status for the span, such as "driving", "off" or "homeCall". GMT reads no meaning into it: each rule names the statuses it counts, and a status no rule names is ignored.
startstringWhen the status begins, as an ISO 8601 instant string with an offset (Z or ±HH:MM).
endstringWhen the status ends, as an ISO 8601 instant string with an offset. It must be after start, and the entry does not include it.
type DutyEntry<S extends string = string> = {
/**
* The caller's status for the span, such as `"driving"`, `"off"` or `"homeCall"`. GMT reads no
* meaning into it: each rule names the statuses it counts, and a status no rule names is ignored.
*/
status: S;
/** When the status begins, as an ISO 8601 instant string with an offset (`Z` or `±HH:MM`). */
start: string;
/**
* When the status ends, as an ISO 8601 instant string with an offset. It must be after `start`,
* and the entry does not include it.
*/
end: string;
};

types/duty.ts