# intervalAbutsTime

Industry: Core

## Signature

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

Return true when two half-open time intervals `[aStart, aEnd)` and `[bStart, bEnd)` are exactly adjacent — one ends where the other starts, so they share nothing and leave no gap.

- Half-open: an interval holds every `t` with `start <= t < end`, so an interval's `end` is the first value after it. Returns `true` when `aEnd === bStart` or `bEnd === aStart` (Allen's "meets"). There is no one-nanosecond step: a one-nanosecond gap is a gap.
- An empty interval (`start === end`) abuts nothing.
- PlainTime has no day rollover: an interval ending at `23:59:59.999999999` never abuts one starting at `00:00:00`.
- Uses `Temporal.PlainTime.compare` for comparison.
- Returns `false` when intervals overlap, are disjoint with a gap, or are invalid.
- 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 |
| `bStart` | `string` | ISO 8601 time string for the second interval start |
| `bEnd` | `string` | ISO 8601 time string for the second interval end |

## Returns

true if intervals are exactly adjacent, or false on invalid input

## Examples

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

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

## Source

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