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

Function addWeeks

pkgs/core/src/addWeeks/index.ts:33–42  ·  view source on GitHub ↗
(
  date: DateArg<DateType>,
  amount: number,
  options?: AddWeeksOptions<ResultDate> | undefined,
)

Source from the content-addressed store, hash-verified

31 * //=> Mon Sep 29 2014 00:00:00
32 */
33export function addWeeks<
34 DateType extends Date,
35 ResultDate extends Date = DateType,
36>(
37 date: DateArg<DateType>,
38 amount: number,
39 options?: AddWeeksOptions<ResultDate> | undefined,
40): ResultDate {
41 return addDays(date, amount * 7, options);
42}

Callers 4

subWeeksFunction · 0.90
test.tsFile · 0.90
eachWeekOfIntervalFunction · 0.90
getISOWeeksInYearFunction · 0.90

Calls 1

addDaysFunction · 0.90

Tested by

no test coverage detected