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

eachDayOfInterval

import { eachDayOfInterval } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Each day between 6 October 2014 and 10 October 2014:
const result = eachDayOfInterval({
  start: new Date(2014, 9, 6),
  end: new Date(2014, 9, 10)
})
//=> [
//   Mon Oct 06 2014 00:00:00,
//   Tue Oct 07 2014 00:00:00,
//   Wed Oct 08 2014 00:00:00,
//   Thu Oct 09 2014 00:00:00,
//   Fri Oct 10 2014 00:00:00
// ]
function eachDayOfInterval<DateType extends Date>(interval: Interval<DateType>, options?: EachDayOfIntervalOptions): DateType[];
§
eachDayOfInterval<DateType extends Date>(interval: Interval<DateType>, options?: EachDayOfIntervalOptions): 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 days from the day of the interval start to the day of the interval end