MCPcopy
hub / github.com/date-fns/date-fns / startOfDay

Function startOfDay

pkgs/core/src/startOfDay/index.ts:33–43  ·  view source on GitHub ↗
(
  date: DateArg<DateType>,
  options?: StartOfDayOptions<ResultDate> | undefined,
)

Source from the content-addressed store, hash-verified

31 * //=> Tue Sep 02 2014 00:00:00
32 */
33export function startOfDay<
34 DateType extends Date,
35 ResultDate extends Date = DateType,
36>(
37 date: DateArg<DateType>,
38 options?: StartOfDayOptions<ResultDate> | undefined,
39): ResultDate {
40 const _date = toDate(date, options?.in);
41 _date.setHours(0, 0, 0, 0);
42 return _date;
43}

Callers 4

startOfTodayFunction · 0.90
test.tsFile · 0.90
differenceInCalendarDaysFunction · 0.90
isSameDayFunction · 0.90

Calls 1

toDateFunction · 0.90

Tested by

no test coverage detected