# isBetweenUtc

Industry: Core

## Signature

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

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

- Uses Temporal.Instant.compare for comparison.
- Returns false if start &gt; end or inputs are invalid.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO UTC datetime string to check |
| `start` | `string` | ISO UTC datetime string for range start |
| `end` | `string` | ISO UTC datetime string for range end |

## Options

**options**

Whether each boundary counts as inside the range

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

## Returns

boolean indicating whether value is between start and end

## Examples

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

isBetweenUtc("2024-03-15T12:00:00Z", "2024-03-10T12:00:00Z", "2024-03-20T12:00:00Z") // true
```

## Source

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