UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

17 lines • 779 B
import { TimeCycleField } from "../types/time-cycle-field.js"; import "../types/index.js"; /** * Return the inclusive wrap bounds for a `TimeCycleField`. Unlike date fields, time field bounds * never depend on the source value — `hour` is always `0–23` (see the `cycleDate`/`cycleTime`/ * `cycleZoned` module docs for why GMT doesn't offer a 12-hour `hourCycle` variant). * * @param field the time field being cycled * @example timeCycleFieldBounds("hour") // { min: 0, max: 23 } * @example timeCycleFieldBounds("minute") // { min: 0, max: 59 } * @example timeCycleFieldBounds("millisecond") // { min: 0, max: 999 } * @returns `{ min, max }` inclusive bounds */ export declare function timeCycleFieldBounds(field: TimeCycleField): { min: number; max: number; };