# isValidCalendarZonedInterval

Industry: Core

## Signature

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

Return true if `start` and `end` form a valid GMT zoned interval — both parseable as bare ISO or RFC 9557 calendar-annotated ZonedDateTime strings, and the instant at `start` is &lt;= the instant at `end`.

- Parallel to `isValidZonedInterval`, which accepts only ISO-calendar endpoints and rejects every non-ISO `[u-ca=...]` annotation (E7, issue #152). Only the calendar-aware `zoned/interval/*` functions gate on this one.
- **Mixed calendars are accepted** (E7's D4-zoned, matching E5's D4): ordering is calendar-independent. Verified against `temporal-polyfill` 1.0.8 — `Temporal.Instant` carries no calendar field at all, and `ZonedDateTime.compare` / `Instant.compare` both return `0` for the same instant expressed in hebrew, islamic-civil, japanese and iso8601. A Hebrew start with an Islamic end is a well-formed interval.
- Equal `start === end` is valid.
- Comparison is done by instant, so intervals spanning DST transitions are compared by absolute time.
- Rejects a calendar annotation before the zone (not RFC 9557), leap seconds, non-strings, and any unparseable endpoint.
- Compatibility: since 1.16.0 calendar strings are RFC 9557 (ISO digits, the `[u-ca=<id>]` annotation after the zone, canonical calendar ids); see `isValidCalendarZonedDateTime`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `start` | `string` | ISO or RFC 9557 calendar-annotated ZonedDateTime string (interval start) |
| `end` | `string` | ISO or RFC 9557 calendar-annotated ZonedDateTime string (interval end) |

## Returns

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

## Examples

```ts
import { isValidCalendarZonedInterval } from "@northguild/gmt/zoned/interval";

isValidCalendarZonedInterval("2024-01-01T10:00:00+00:00[UTC]", "2024-12-31T23:59:59+00:00[UTC]") // true
```

## Source

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