Skip to main content
Deno 2 is finally here 🎉️
Learn more
Very Popular
Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.22.1/differenceInMilliseconds/index.ts";

Examples

// How many milliseconds are between // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? const result = differenceInMilliseconds( new Date(2014, 6, 2, 12, 30, 21, 700), new Date(2014, 6, 2, 12, 30, 20, 600) ) //=> 1100

Parameters

dirtyDateLeft: Date | number
  • the later date
dirtyDateRight: Date | number
  • the earlier date

Returns

number

the number of milliseconds