UseLastDayOfMonth
katanakit-js / useLastDayOfMonth
Function: useLastDayOfMonth()
Section titled “Function: useLastDayOfMonth()”function useLastDayOfMonth(date?): string;Defined in: core/services/dates.service.ts:743
Returns the last day of the month for a given date.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
date? |
string | PlainDate |
Base date (defaults to today). |
Returns
Section titled “Returns”string
The last day of the month as an ISO string.
Example
Section titled “Example”useLastDayOfMonth("2024-02-10"); // "2024-02-29"