UseFirstDayOfMonth
katanakit-js / useFirstDayOfMonth
Function: useFirstDayOfMonth()
Section titled “Function: useFirstDayOfMonth()”function useFirstDayOfMonth(date?): string;Defined in: core/services/dates.service.ts:726
Returns the first 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 first day of the month as an ISO string.
Example
Section titled “Example”useFirstDayOfMonth("2024-06-15"); // "2024-06-01"