Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

addMilliseconds

import { addMilliseconds } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Add 750 milliseconds to 10 July 2014 12:45:30.000:
const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
//=> Thu Jul 10 2014 12:45:30.750
function addMilliseconds<DateType extends Date>(date: DateType | number | string, amount: number): DateType;
§
addMilliseconds<DateType extends Date>(date: DateType | number | string, amount: number): DateType
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
date: DateType | number | string
[src]
  • The date to be changed
§
amount: number
[src]
  • The amount of milliseconds to be added.

§Return Type

§
DateType
[src]

The new date with the milliseconds added