@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
16 lines (15 loc) • 658 B
TypeScript
/**
* 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.
*
* @param month ISO PlainYearMonth string (YYYY-MM)
* @returns array of ISO PlainDate strings for each day in the month
*
* @example mapDaysInMonth("2024-02") // ["2024-02-01", "2024-02-02", ..., "2024-02-29"]
* @example mapDaysInMonth("2024-04") // ["2024-04-01", "2024-04-02", ..., "2024-04-30"]
* @example mapDaysInMonth("invalid") // []
*/
export declare function mapDaysInMonth(month: string): string[];