Skip to main content
Very Popular
Go to Latest
function differenceInHours
import { differenceInHours } from "https://deno.land/x/date_fns@v2.11.1/index.js";

Examples

// How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00? var result = differenceInHours( new Date(2014, 6, 2, 19, 0), new Date(2014, 6, 2, 6, 50) ) //=> 12

Parameters

dirtyDateLeft
  • the later date
dirtyDateRight
  • the earlier date