# maxZoned

Industry: Core

## Signature

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

Return the latest (maximum) 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 latest zoned datetime string, or null on invalid input

## Examples

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

maxZoned(["2024-03-10T12:00:00[Asia/Kolkata]", "2024-03-15T12:00:00[Asia/Kolkata]"]) // "2024-03-15T12:00:00+05:30[Asia/Kolkata]"
```

## Source

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