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

Examples

// How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00? var result = differenceInMinutes( new Date(2014, 6, 2, 12, 20, 0), new Date(2014, 6, 2, 12, 7, 59) ) //=> 12

// How many minutes are from 10:01:59 to 10:00:00 var result = differenceInMinutes( new Date(2000, 0, 1, 10, 0, 0), new Date(2000, 0, 1, 10, 1, 59) ) //=> -1

Parameters

dirtyDateLeft
  • the later date
dirtyDateRight
  • the earlier date