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

Function subDays

pkgs/core/src/subDays/index.ts:30–39  ·  view source on GitHub ↗
(
  date: DateArg<DateType>,
  amount: number,
  options?: SubDaysOptions<ResultDate> | undefined,
)

Source from the content-addressed store, hash-verified

28 * //=> Fri Aug 22 2014 00:00:00
29 */
30export function subDays<
31 DateType extends Date,
32 ResultDate extends Date = DateType,
33>(
34 date: DateArg<DateType>,
35 amount: number,
36 options?: SubDaysOptions<ResultDate> | undefined,
37): ResultDate {
38 return addDays(date, -amount, options);
39}

Callers 4

subFunction · 0.90
previousDayFunction · 0.90
isYesterdayFunction · 0.90
test.tsFile · 0.90

Calls 1

addDaysFunction · 0.90

Tested by

no test coverage detected