maxTime
Signature
Section titled “Signature”maxTime(times: string[]): stringimport { maxTime } from "@northguild/gmt/plain/calculate";Return the latest (maximum) of the given PlainTime values.
- Returns null if the array is empty or contains no valid times.
- Validation is performed on each item in the array.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
times |
string[] |
Array of ISO PlainTime strings (e.g. “14:30:00”) |
Returns
Section titled “Returns”The latest time string, or null on invalid input
Examples
Section titled “Examples”maxTime(["14:30:00", "09:00:00", "20:45:00"]) // "20:45:00"maxTime([]) // null