endOfYearMonth
Signature
Section titled “Signature”endOfYearMonth(value: string): stringThe last day of a year-month, as an ISO date.
- February ends on the 29th in a leap year and on the 28th in any other.
- The highest year-month,
+275760-09, holds only+275760-09-01to+275760-09-13, so its last 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 of the last day, or "" when value is not a valid year-month or its last day is outside the PlainDate range
Examples
Section titled “Examples”import { endOfYearMonth } from "@northguild/gmt/plain/calculate";
endOfYearMonth("2026-10") // "2026-10-31"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.