# startOfQuarterForZoned

Industry: Core

## Signature

```ts
startOfQuarterForZoned(value: string, optionsArg?: { fractionalSecondDigits?: FractionalDigit; }): string
```

Return the start of the quarter for a given zoned ISO datetime.

- Calculates which quarter (1-4) the date falls into and returns the first instant of that quarter, with every field below the day reset — milliseconds, microseconds and nanoseconds included.
- Returns the real start of the local quarter in `value`'s own zone (see `floorToZone`), so the result is never after `value`: a skipped first midnight starts at the quarter's first real instant, and a repeated one (`Africa/Tunis`, 1978-10-01) at its first pass.
- Validation is performed on the input.

## Parameters

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

## Options

**optionsArg**

optional setting for the precision of the output string

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `fractionalSecondDigits?` | `0` \| `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `"auto"` \| `8` \| `9` ([`FractionalDigit`](/gmt/reference/types/FractionalDigit/)) | `0` | The number of fractional-second digits the result is written with, `0` to `9`, or `"auto"` to drop trailing zeros. A start has no sub-second part, so any digits written are zeros. |

## Returns

ISO ZonedDateTime string for the start of the quarter, or "" on invalid input

## Related types

- [`FractionalDigit`](/gmt/reference/types/FractionalDigit/)

## Examples

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

startOfQuarterForZoned("2024-02-15T14:30:00+00:00[UTC]") // "2024-01-01T00:00:00+00:00[UTC]"
```

## Source

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