# isValidDateInterval

Industry: Core

## Signature

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

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

- Both inputs must be ISO 8601 date strings (e.g. `"2024-01-01"`).
- Equal `start === end` is valid.
- Invalid input, malformed strings, or leap-second strings return `false`.
- Accepts RFC 9557 calendar-annotated PlainDate strings — E5 (issue #78). Ordering is calendar-independent, so `start`/`end` may carry different or no calendar tags.
- Compatibility: since 1.16.0 calendar strings are RFC 9557 (ISO digits, `[u-ca=<id>]`, canonical calendar ids); see `isValidCalendarDate`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `start` | `string` | ISO 8601 date string (interval start), optionally calendar-annotated |
| `end` | `string` | ISO 8601 date string (interval end), optionally calendar-annotated |

## Returns

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

## Examples

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

isValidDateInterval("2024-01-01", "2024-12-31") // true
```

## Source

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