( date: DateArg<DateType>, options?: StartOfMonthOptions<ResultDate> | undefined, )
| 32 | * //=> Mon Sep 01 2014 00:00:00 |
| 33 | */ |
| 34 | export function startOfMonth< |
| 35 | DateType extends Date, |
| 36 | ResultDate extends Date = DateType, |
| 37 | >( |
| 38 | date: DateArg<DateType>, |
| 39 | options?: StartOfMonthOptions<ResultDate> | undefined, |
| 40 | ): ResultDate { |
| 41 | const _date = toDate(date, options?.in); |
| 42 | _date.setDate(1); |
| 43 | _date.setHours(0, 0, 0, 0); |
| 44 | return _date; |
| 45 | } |
no test coverage detected