mapDaysInMonth
Signature
Section titled “Signature”mapDaysInMonth(month: string): string[]Return an array of ISO PlainDate strings for every day in the given year-month.
- Generates array of dates for the specified month.
- Validates input matches the year-month format exactly.
- Returns [] for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
month | string | ISO PlainYearMonth string (YYYY-MM) |
Returns
Section titled “Returns”array of ISO PlainDate strings for each day in the month
Examples
Section titled “Examples”import { mapDaysInMonth } from "@northguild/gmt/plain/map";
mapDaysInMonth("2024-02") // ["2024-02-01", "2024-02-02", ..., "2024-02-29"]