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]§Parameters
§
options?: EachHourOfIntervalOptions optional
[src]- An object with options.