# parseMonthDay

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

## Signature

```ts
parseMonthDay(value: string): string
```

Return the canonical `--MM-DD` form of an ISO month-day string.

- Reads `--MM-DD` and `MM-DD`; writes `--MM-DD`. The reference year 1972 is never written.
- The extended form only: `--1225` and `1225` are refused.
- Annotations are read as `isValidMonthDay` reads them: elective and time zone annotations are ignored, an unknown critical one refuses, and `u-ca` must be `iso8601` in any case.
- `--02-29` is valid; `--02-30` and `--04-31` are not.
- Returns "" for invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO month-day string |

## Returns

the `--MM-DD` string, or "" on invalid input

## Examples

```ts
import { parseMonthDay } from "@northguild/gmt/plain/parse";

parseMonthDay("--12-25") // "--12-25"
```

## Source

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