startOfYearMonth
Signature
Section titled “Signature”startOfYearMonth(value: string): stringThe first day of a year-month, as an ISO date.
- The lowest year-month,
-271821-04, holds only-271821-04-19to-271821-04-30, so its first day is not a PlainDate and the result is"".
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | a year-month, YYYY-MM |
Returns
Section titled “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
Section titled “Examples”import { startOfYearMonth } from "@northguild/gmt/plain/calculate";
startOfYearMonth("2026-10") // "2026-10-01"Source
Section titled “Source”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.