# workforce/calculate

Industry: Workforce

- [`dutyDayFor`](/gmt/reference/workforce/calculate/dutyDayFor/): Return the operator-designated day an instant falls in: from the most recent `dayStartTime` in `timeZone` at or before the instant, up to (not including) the next one.
- [`dutyTotals`](/gmt/reference/workforce/calculate/dutyTotals/): Return the time a duty log spends in any of `statuses` inside a window, as an exact ISO 8601 duration.
- [`dutyViolations`](/gmt/reference/workforce/calculate/dutyViolations/): Return every violation of a set of hours-of-work rules inside a range, each with the window that failed it: the record over a month, not the check before dispatch.
- [`evaluateDutyLog`](/gmt/reference/workforce/calculate/evaluateDutyLog/): Evaluate every hours-of-work rule over a duty log at one instant, and report each one whether or not it binds.
- [`longestRun`](/gmt/reference/workforce/calculate/longestRun/): Return the longest unbroken stretch a duty log spends in any of `statuses` inside a window.
- [`qualifyingRestPairs`](/gmt/reference/workforce/calculate/qualifyingRestPairs/): Return every paired rest in a duty log: two separate rests that together count as one, because they meet all three floors of `spec.pair`.
- [`qualifyingRests`](/gmt/reference/workforce/calculate/qualifyingRests/): Return every rest of at least `minimum` in a duty log: the runs of touching entries in any of `spec.statuses` that last that long.

## Types

- [`DutyDay`](/gmt/reference/workforce/calculate/dutyDayFor/#dutyday): The operator-designated day: a 24-hour period that starts at `dayStartTime` in `timeZone`, wherever the person is.
- [`DutyReport`](/gmt/reference/workforce/calculate/evaluateDutyLog/#dutyreport): Every rule of a regime evaluated at one instant.
- [`DutyViolation`](/gmt/reference/workforce/calculate/dutyViolations/#dutyviolation): One failed window in a range, for the record.
- [`PeriodBasis`](/gmt/reference/workforce/calculate/evaluateDutyLog/#periodbasis): Which arithmetic a window used: exact elapsed time, operator days, or local calendar periods.
- [`RestPair`](/gmt/reference/workforce/calculate/qualifyingRestPairs/#restpair): Two rest periods that satisfy a `PairSpec`, in the order they were taken.
- [`RuleOutcome`](/gmt/reference/workforce/calculate/evaluateDutyLog/#ruleoutcome): One rule evaluated at one instant, reported whether or not it binds.
