# intervalAbutsUnix

Industry: Core

## Signature

```ts
intervalAbutsUnix(aStart: string | number, aEnd: string | number, bStart: string | number, bEnd: string | number): boolean
```

Return true when two half-open Unix intervals `[start, end)` are exactly adjacent — one ends where the other starts, so they share no value and leave no gap (Allen's "meets", either order).

- Compares numeric Unix epoch values directly.
- Returns `true` when `aEnd === bStart` or `bEnd === aStart` and neither interval is empty. No value is stepped by an epoch unit.
- Returns `false` when intervals overlap, are disjoint with a gap (even one epoch unit), or when either is empty (`start === end`): an empty interval abuts nothing.
- Returns `false` on invalid input: non-numeric types, empty strings, and values that are not safe integers (fractions, `NaN`, `±Infinity`, beyond ±(2^53 − 1)).

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `aStart` | `string` \| `number` | Unix epoch value, in the one unit all epoch arguments share — first interval start |
| `aEnd` | `string` \| `number` | Unix epoch value, in the one unit all epoch arguments share — first interval end |
| `bStart` | `string` \| `number` | Unix epoch value, in the one unit all epoch arguments share — second interval start |
| `bEnd` | `string` \| `number` | Unix epoch value, in the one unit all epoch arguments share — second interval end |

## Returns

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

## Examples

```ts
import { intervalAbutsUnix } from "@northguild/gmt/unix/interval";

intervalAbutsUnix(0, 1500000000, 1500000000, 1700000000) // true
```

## Source

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