Skip to main content
Very Popular
Go to Latest
function differenceInSeconds
import { differenceInSeconds } from "https://deno.land/x/date_fns@v2.0.0-alpha.36/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