UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

17 lines (16 loc) 750 B
import type { TimeCycleField } from "../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; };