# isBetweenZoned

Industry: Core

## Signature

```ts
isBetweenZoned(zoned: string, start: string, end: string, options?: { inclusiveStart?: boolean; inclusiveEnd?: boolean; }): boolean
```

Return true when `zoned` is between `start` and `end` (inclusive by default).

- Validates inputs and then compares using Temporal.Instant (same instant semantics).
- Returns false for invalid inputs.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `zoned` | `string` | ISO ZonedDateTime string to check |
| `start` | `string` | ISO ZonedDateTime string for the start of the range |
| `end` | `string` | ISO ZonedDateTime string for the end of the range |

## Options

**options**

optional settings for whether each end of the range is included

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `inclusiveStart?` | `boolean` | `true` | Whether `zoned` at the same instant as `start` counts as inside the range. `false` requires it to be after `start`. |
| `inclusiveEnd?` | `boolean` | `true` | Whether `zoned` at the same instant as `end` counts as inside the range. `false` requires it to be before `end`. |

## Returns

boolean indicating whether zoned is between start and end

## Examples

```ts
import { isBetweenZoned } from "@northguild/gmt/zoned/compare";

isBetweenZoned("2024-02-29T12:00:00+00:00[UTC]", "2024-02-29T11:00:00+00:00[UTC]", "2024-02-29T13:00:00+00:00[UTC]") // true
```

## Source

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