Very Popular
Latest
function default
import { default } from "https://dotland.deno.dev/x/date_fns@v2.22.1/subMilliseconds/index.ts";

Examples

// Subtract 750 milliseconds from 10 July 2014 12:45:30.000: const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) //=> Thu Jul 10 2014 12:45:29.250

Parameters

dirtyDate: Date | number
  • the date to be changed
dirtyAmount: number
  • the amount of milliseconds to be subtracted. Positive decimals will be rounded using Math.floor, decimals less than zero will be rounded using Math.ceil.