temporal-fns
API reference

min

API index · Input types and conventions · Installation

min(values) → input kind | undefined

Select the earliest value. Equal minima retain the first original object.

import { min } from '@frantss/temporal-fns';

const early = Temporal.PlainDate.from('2026-10-22');
const late = Temporal.PlainDate.from('2026-10-23');
min([late, early]) === early; // => true
min([early, Temporal.PlainDate.from('2026-10-22')]) === early; // => true
min([]); // => undefined

Related: max, closestTo, clamp.

Behaviors: SEL-001: Minima and maxima preserve the selected object; SEL-003: Empty collections return undefined; SEL-004: Equal extrema keep the first occurrence; SEL-005: Exact time, rather than displayed local order, orders zoned values.