# startOfQuarterForUtc

Industry: Core

## Signature

```ts
startOfQuarterForUtc(value: string): string
```

Return the start of the quarter for a given UTC datetime string.

- Calculates quarter start month: Q1=1, Q2=4, Q3=7, Q4=10.
- Resets every time field, including milliseconds, microseconds and nanoseconds.
- Returns "" for invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO UTC datetime string (e.g. "2024-03-15T12:00:00Z") |

## Returns

ISO UTC datetime string representing the start of the quarter, or "" on invalid input

## Examples

```ts
import { startOfQuarterForUtc } from "@northguild/gmt/utc/calculate";

startOfQuarterForUtc("2024-03-15T12:00:00Z") // "2024-01-01T00:00:00Z"
```

## Source

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