Skip to content

UseFirstDayOfMonth

katanakit-js / useFirstDayOfMonth

function useFirstDayOfMonth(date?): string;

Defined in: core/services/dates.service.ts:726

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

Parameter Type Description
date? string | PlainDate Base date (defaults to today).

string

The first day of the month as an ISO string.

useFirstDayOfMonth("2024-06-15"); // "2024-06-01"