# startOfYearMonth

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

## Signature

```ts
startOfYearMonth(value: string): string
```

The first day of a year-month, as an ISO date.

- The lowest year-month, `-271821-04`, holds only `-271821-04-19` to `-271821-04-30`, so its first day is not a PlainDate and the result is `""`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | a year-month, `YYYY-MM` |

## Returns

the ISO date `YYYY-MM-01`, or `""` when `value` is not a valid year-month or its first day is outside the PlainDate range

## Examples

```ts
import { startOfYearMonth } from "@northguild/gmt/plain/calculate";

startOfYearMonth("2026-10") // "2026-10-01"
```

## Source

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