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

Examples

// Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour? var result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 6, 30)) //=> true

Parameters

dirtyDateLeft: Date | number
  • the first date to check
dirtyDateRight: Date | number
  • the second date to check

Returns

boolean

the dates are in the same hour