# isValidTime

Industry: Core

## Signature

```ts
isValidTime(value: string): boolean
isValidTime(value: void | {} | null | undefined): boolean
isValidTime(value: unknown): value is string
```

Return true when `value` is a valid ISO PlainTime string.

- The whole string must match `plainTime`.
- Accepts no annotation of any kind: a time zone, a calendar (`[u-ca=iso8601]`) or an elective one (`[foo=bar]`) returns `false`.
- Rejects leap seconds (e.g., "23:59:60").
- Rejects invalid times (e.g., "24:00:00", "23:60:00").
- A value that is not a string, a `String` object included, returns `false`. A `true` result narrows an `unknown` value to `string`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | any value; a string is checked as an ISO PlainTime |

## Returns

boolean indicating validity

## Examples

```ts
import { isValidTime } from "@northguild/gmt/plain/validate";

isValidTime("12:34:56") // true
```

## Source

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