Returns a new Date representing the first day of the month at midnight (local time).
Date
The input date.
startOfMonth(new Date("2024-06-15")) // => 2024-06-01T00:00:00.000 Copy
startOfMonth(new Date("2024-06-15")) // => 2024-06-01T00:00:00.000
Returns a new
Daterepresenting the first day of the month at midnight (local time).