# intervalsOverlapUtc

Industry: Core

## Signature

```ts
intervalsOverlapUtc(aStart: string, aEnd: string, bStart: string, bEnd: string): boolean
```

Return true when the half-open UTC intervals `[aStart, aEnd)` and `[bStart, bEnd)` share at least one instant.

- Half-open: an interval holds every instant `t` with `start <= t < end`, so `end` itself is not in it. The test is `aStart < bEnd && bStart < aEnd`.
- Delegates to CORE-6's `intervalsOverlap` once the arguments pass the UTC-string gate, so the answer always equals `intervalsOverlap({ start: aStart, end: aEnd }, { start: bStart, end: bEnd })`.
- Touching intervals (`aEnd` equal to `bStart`) share no instant and do not overlap.
- An empty interval (`start === end`) overlaps only an interval it lies strictly inside.
- Returns `false` if either interval is invalid (`start > end`).
- Returns `false` on invalid input (wrong type, non-`Z` strings, malformed strings, leap seconds).

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `aStart` | `string` | ISO 8601 UTC datetime string for the first interval start |
| `aEnd` | `string` | ISO 8601 UTC datetime string for the first interval end (excluded) |
| `bStart` | `string` | ISO 8601 UTC datetime string for the second interval start |
| `bEnd` | `string` | ISO 8601 UTC datetime string for the second interval end (excluded) |

## Returns

true if intervals overlap, or false on invalid input

## Examples

```ts
import { intervalsOverlapUtc } from "@northguild/gmt/utc/interval";

intervalsOverlapUtc("2024-01-01T09:00:00Z", "2024-01-01T13:00:00Z", "2024-01-01T12:00:00Z", "2024-01-01T17:00:00Z") // true
```

## Source

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