# getQuarterForZoned

Industry: Core

## Signature

```ts
getQuarterForZoned(value: string): number | null
```

Return the quarter of the year (1-4) for a given zoned ISO datetime.

- Q1 = months 1-3, Q2 = months 4-6, Q3 = months 7-9, Q4 = months 10-12.
- Validation is performed on the input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO ZonedDateTime string |

## Returns

number (1-4) or null on invalid input

## Examples

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

getQuarterForZoned("2024-02-15T14:30:00+00:00[UTC]") // 1
```

## Source

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