Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

isSameMinute

import { isSameMinute } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15 in the same minute?
const result = isSameMinute(
  new Date(2014, 8, 4, 6, 30),
  new Date(2014, 8, 4, 6, 30, 15)
)
//=> true
@example
// Are 4 September 2014 06:30:00 and 5 September 2014 06:30:00 in the same minute?
const result = isSameMinute(
  new Date(2014, 8, 4, 6, 30),
  new Date(2014, 8, 5, 6, 30)
)
//=> false
function isSameMinute<DateType extends Date>(dateLeft: DateType | number | string, dateRight: DateType | number | string): boolean;
§
isSameMinute<DateType extends Date>(dateLeft: DateType | number | string, dateRight: DateType | number | string): boolean
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
dateLeft: DateType | number | string
[src]
  • The first date to check
§
dateRight: DateType | number | string
[src]
  • The second date to check

§Return Type

§
boolean
[src]

The dates are in the same minute (and hour and day)