# parseMonthDayFromDateTime

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

## Signature

```ts
parseMonthDayFromDateTime(value: string): string
```

Return the month-day (`--MM-DD`) of an ISO 8601 date-time string.

- The year and the time are dropped, so the time never moves the day.
- A `Z` or an offset gives `""`; a time zone annotation with no offset is ignored, as `isValidDateTime` reads it.
- Only the ISO calendar is read.
- Returns "" for invalid input.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | ISO date-time string |

## Returns

The canonical `--MM-DD` string, or "" on invalid input

## Examples

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

parseMonthDayFromDateTime("2024-12-25T10:00:00") // "--12-25"
```

## Source

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