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

Function startOfTomorrow

pkgs/core/src/startOfTomorrow/index.ts:32–44  ·  view source on GitHub ↗
(
  options?: StartOfTomorrowOptions<ContextDate> | undefined,
)

Source from the content-addressed store, hash-verified

30 * //=> Tue Oct 7 2014 00:00:00
31 */
32export function startOfTomorrow<ContextDate extends Date>(
33 options?: StartOfTomorrowOptions<ContextDate> | undefined,
34): ContextDate {
35 const now = constructNow(options?.in);
36 const year = now.getFullYear();
37 const month = now.getMonth();
38 const day = now.getDate();
39
40 const date = constructFrom(options?.in, 0);
41 date.setFullYear(year, month, day + 1);
42 date.setHours(0, 0, 0, 0);
43 return date;
44}

Callers 1

test.tsFile · 0.90

Calls 2

constructNowFunction · 0.90
constructFromFunction · 0.90

Tested by

no test coverage detected