Skip to content
0

katanakit-js / useFirstDayOfMonth

Function: useFirstDayOfMonth() ​

ts
function useFirstDayOfMonth(date?): string;

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

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

Parameters ​

ParameterTypeDescription
datestring | PlainDateBase date (defaults to today).

Returns ​

string

The first day of the month as an ISO string.

Example ​

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

Released under the MIT License.