UNPKG

@burglekitt/gmt

Version:

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

14 lines (13 loc) 593 B
/** * Return the earliest (minimum) of the given PlainDateTime values. * * - Returns null if the array is empty or contains no valid datetimes. * - Validation is performed on each item in the array. * * @param dateTimes Array of ISO PlainDateTime strings (e.g. "2024-03-10T12:00:00") * @returns The earliest datetime string, or null on invalid input * * @example minDateTime(["2024-03-10T12:00:00", "2024-03-15T12:00:00", "2024-03-12T12:00:00"]) // "2024-03-10T12:00:00" * @example minDateTime([]) // null */ export declare function minDateTime(dateTimes: string[]): string | null;