# intervalsOverlapTime

Industry: Core

## Signature

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

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

- Half-open: an interval holds every `t` with `start <= t < end`, so `end` itself is not in it (the rule CORE-6's `intervalsOverlap` uses). The test is `aStart < bEnd && bStart < aEnd`.
- Touching intervals (`aEnd` equal to `bStart`) share no time and do not overlap.
- An empty interval (`start === end`) overlaps only an interval it lies strictly inside.
- PlainTime has no day rollover: an interval never wraps past midnight.
- Uses `Temporal.PlainTime.compare` for comparison.
- Returns `false` if either interval is invalid (`start > end`).
- Returns `false` on invalid input (wrong type, malformed strings).

## Parameters

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

## Returns

true if intervals overlap, or false on invalid input

## Examples

```ts
import { intervalsOverlapTime } from "@northguild/gmt/plain/interval";

intervalsOverlapTime("09:00:00", "17:00:00", "12:00:00", "18:00:00") // true
```

## Source

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