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

eachHourOfInterval

import { eachHourOfInterval } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Each hour between 6 October 2014, 12:00 and 6 October 2014, 15:00
const result = eachHourOfInterval({
  start: new Date(2014, 9, 6, 12),
  end: new Date(2014, 9, 6, 15)
})
//=> [
//   Mon Oct 06 2014 12:00:00,
//   Mon Oct 06 2014 13:00:00,
//   Mon Oct 06 2014 14:00:00,
//   Mon Oct 06 2014 15:00:00
// ]
function eachHourOfInterval<DateType extends Date>(interval: Interval<DateType>, options?: EachHourOfIntervalOptions): DateType[];
§
eachHourOfInterval<DateType extends Date>(interval: Interval<DateType>, options?: EachHourOfIntervalOptions): DateType[]
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
interval: Interval<DateType>
[src]
  • The interval.
§
  • An object with options.

§Return Type

§
DateType[]
[src]

The array with starts of hours from the hour of the interval start to the hour of the interval end