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

Function addMilliseconds

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

Source from the content-addressed store, hash-verified

31 * //=> Thu Jul 10 2014 12:45:30.750
32 */
33export function addMilliseconds<
34 DateType extends Date,
35 ResultDate extends Date = DateType,
36>(
37 date: DateArg<DateType>,
38 amount: number,
39 options?: AddMillisecondsOptions<ResultDate> | undefined,
40): ResultDate {
41 return constructFrom(options?.in || date, +toDate(date) + amount);
42}

Callers 4

test.tsFile · 0.90
subMillisecondsFunction · 0.90
addHoursFunction · 0.90
addSecondsFunction · 0.90

Calls 2

constructFromFunction · 0.90
toDateFunction · 0.90

Tested by

no test coverage detected