Skip to content
0

katanakit-js / useLastDayOfMonth

Function: useLastDayOfMonth() ​

ts
function useLastDayOfMonth(date?): string;

Defined in: src/core/services/dates.service.ts:743

Returns the last day of the month for a given date.

Parameters ​

ParameterTypeDescription
datestring | PlainDateBase date (defaults to today).

Returns ​

string

The last day of the month as an ISO string.

Example ​

ts
useLastDayOfMonth("2024-02-10"); // "2024-02-29"

Released under the MIT License.