# endOfQuarterForDateTime

Industry: Core

## Signature

```ts
endOfQuarterForDateTime(value: string): string
```

Return the end of the quarter for a given ISO datetime.

- Returns the last moment of the quarter with time set to 23:59:59.999999999.
- Q1 ends on "03-31T23:59:59.999999999", Q2 ends on "06-30T23:59:59.999999999", etc.
- Validates input using isValidDateTime.

## Parameters

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

## Returns

ISO PlainDateTime string for the end of the quarter, or "" on invalid input

## Examples

```ts
import { endOfQuarterForDateTime } from "@northguild/gmt/plain/calculate";

endOfQuarterForDateTime("2024-03-15T12:00:00") // "2024-03-31T23:59:59.999999999"
```

## Source

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