# minZoned

Industry: Core

## Signature

```ts
minZoned(zonedDateTimes: string[]): string | null
```

Return the earliest (minimum) of the given ZonedDateTime values.

- Returns null if the array is empty or contains no valid dates.
- Validation is performed on each item in the array.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `zonedDateTimes` | `string[]` | Array of ISO ZonedDateTime strings |

## Returns

The earliest zoned datetime string, or null on invalid input

## Examples

```ts
import { minZoned } from "@northguild/gmt/zoned/calculate";

minZoned(["2024-03-10T12:00:00[America/Sao_Paulo]", "2024-03-15T12:00:00[America/Sao_Paulo]"]) // "2024-03-10T12:00:00-03:00[America/Sao_Paulo]"
```

## Source

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