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.0.0-beta.4/differenceInHours/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