# isValidIsoDateLike

Industry: Core

## Signature

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

Return true when the input is a valid PlainDate or PlainDateTime ISO string.

- Accepts both PlainDate ("2024-02-29") and PlainDateTime ("2024-02-29T12:34:56") formats.
- The whole string must match `plainDate` or `plainDateTime`.
- 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 and invalid dates/times.
- 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 PlainDate or PlainDateTime |

## Returns

boolean indicating validity

## Examples

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

isValidIsoDateLike("2024-02-29") // true
```

## Source

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