Skip to content

mapDaysInMonth

  • The core functions, which every industry uses.
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.
ParameterTypeDescription
monthstringISO PlainYearMonth string (YYYY-MM)

array of ISO PlainDate strings for each day in the month

import { mapDaysInMonth } from "@northguild/gmt/plain/map";
mapDaysInMonth("2024-02") // ["2024-02-01", "2024-02-02", ..., "2024-02-29"]
output 

plain/map/mapDaysInMonth.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.