Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function differenceInSeconds
import { differenceInSeconds } from "https://deno.land/x/date_fns@v2.0.0-alpha.34/index.js";

Examples

// How many seconds are between // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? var result = differenceInSeconds( new Date(2014, 6, 2, 12, 30, 20, 0), new Date(2014, 6, 2, 12, 30, 7, 999) ) //=> 12

Parameters

dirtyDateLeft
  • the later date
dirtyDateRight
  • the earlier date