# minTime

Industry: Core

## Signature

```ts
minTime(times: string[]): string | null
```

Return the earliest (minimum) 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

| Parameter | Type | Description |
| --- | --- | --- |
| `times` | `string[]` | Array of ISO PlainTime strings (e.g. "14:30:00") |

## Returns

The earliest time string, or null on invalid input

## Examples

```ts
import { minTime } from "@northguild/gmt/plain/calculate";

minTime(["14:30:00", "09:00:00", "20:45:00"]) // "09:00:00"
```

## Source

[plain/calculate/minTime.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/plain/calculate/minTime.ts)
