# formatSsimDate

Industry: Aviation

:::caution[Unreleased]
Not in `@northguild/gmt` 1.21.0 on npm yet. It is on `main` and ships in the next release.
:::

## Signature

```ts
formatSsimDate(value: string, options: TwoDigitYearOptions): string
```

Write an ISO 8601 date as an SSIM schedule date. The inverse of `parseSsimDate`.

- **What it writes.** An SSIM date is `DDMMMYY`: two digits of day, the first three letters of the month's English name in upper case, and two digits of year.
- **Locale-independent.** The letters are a fixed code. They are never read or written through `Intl`, so the platform's or the caller's locale changes nothing.
- **`value`** is a date, as `isValidDate` accepts it, in the ISO calendar. A date-time, an instant or a non-ISO calendar returns `""`.
- **The year must lie inside the window.** `options.yearWindow` is a fixed first year or `"rolling"`. A year outside the hundred years it covers returns `""`: written as two digits, it would read back as another century. So `parseSsimDate(formatSsimDate(d, o), o)` is `d` for every canonical date it writes, with the same fixed window.
- **Without `yearWindow`** the result is `""`.
- **Sources.** The day and the month letters: SSIM Chapter 6, as two guides give it. They are ACL's _An Introductory Guide to SSIM_ (April 2021), which shows `01APR`, and AECFA's _Quick Guide to Using the IATA SSIM format_, which is no longer online. The seven-character form: EUROCONTROL's _CSST Users Guide_ §3.2 Figure 1. Avinor's SSIM description shows a two-digit year in the validity period. IATA's own Chapter 7 text was not reached.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | An ISO 8601 calendar date (e.g. "2026-10-25") |

## Options

**options**

The hundred-year window the year must lie in

Type: [`TwoDigitYearOptions`](/gmt/reference/types/TwoDigitYearOptions/).

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `yearWindow?` | `number` \| `"rolling"` | None. A value with a two-digit year returns the sentinel: no standard says which century it belongs to, so the caller states it. | The hundred-year window a two-digit year falls in. A number is the first year of a fixed window, an integer from 0 to 9900: `2000` reads `00`–`99` as 2000–2099; `1950` reads `50`–`99` as 1950–1999 and `00`–`49` as 2000–2049. A fixed window gives the same answer in any year, so it is the form for stored data, archives and anything re-processed later. `"rolling"` is the hundred years around today: from 50 years before the current UTC calendar year to 49 years after it (in 2026, 1976–2075). It is the form for live messages and never needs maintenance, but it gives a different answer for the same stored value as years pass. Any other value returns the function's sentinel. |

## Returns

the `DDMMMYY` string ("25OCT26"), or "" on invalid input

## Related types

- [`TwoDigitYearOptions`](/gmt/reference/types/TwoDigitYearOptions/)

## Examples

```ts
import { formatSsimDate } from "@northguild/gmt/aviation/format";

formatSsimDate("2026-10-25", { yearWindow: 2000 }) // "25OCT26"
```

## Source

[aviation/format/formatSsimDate.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/aviation/format/formatSsimDate.ts)
