# areMonthDaysEqual

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

## Signature

```ts
areMonthDaysEqual(a: string, b: string): boolean
```

Check whether two month-day strings (`--MM-DD`, or `MM-DD`) name the same day of the year.

- Accepts both input forms, so `12-25` and `--12-25` are equal.
- The year is not part of a month-day: `--02-29` is not equal to `--02-28`.
- Returns `false` if either input is invalid or not in the ISO calendar.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `string` | month-day string |
| `b` | `string` | month-day string |

## Returns

`true` only when both are valid and name the same month and day, or `false` on invalid input

## Examples

```ts
import { areMonthDaysEqual } from "@northguild/gmt/plain/compare";

areMonthDaysEqual("12-25", "--12-25") // true
```

## Source

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