# isValidTimeInterval

Industry: Core

## Signature

```ts
isValidTimeInterval(start: string, end: string): boolean
```

Return true if `start` and `end` form a valid time interval — both parseable as ISO PlainTime strings and `start <= end`.

- Both inputs must be ISO 8601 time strings (e.g. `"14:30:00"`).
- Equal `start === end` is valid.
- Invalid input, malformed strings, or leap-second strings return `false`.
- Each endpoint must satisfy `isValidTime`, so an annotation of any kind (a time zone, a calendar, an elective one) returns `false`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `start` | `string` | ISO 8601 time string (interval start) |
| `end` | `string` | ISO 8601 time string (interval end) |

## Returns

true if start and end form a valid time interval, or false on invalid input

## Examples

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

isValidTimeInterval("09:00:00", "17:00:00") // true
```

## Source

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