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

eachWeekendOfInterval

import { eachWeekendOfInterval } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Lists all Saturdays and Sundays in the given date interval
const result = eachWeekendOfInterval({
  start: new Date(2018, 8, 17),
  end: new Date(2018, 8, 30)
})
//=> [
//   Sat Sep 22 2018 00:00:00,
//   Sun Sep 23 2018 00:00:00,
//   Sat Sep 29 2018 00:00:00,
//   Sun Sep 30 2018 00:00:00
// ]
function eachWeekendOfInterval<DateType extends Date>(interval: Interval<DateType>): DateType[];
§
eachWeekendOfInterval<DateType extends Date>(interval: Interval<DateType>): DateType[]
[src]

§Type Parameters

§
DateType extends Date
[src]

§Parameters

§
interval: Interval<DateType>
[src]
  • The given interval

§Return Type

§
DateType[]
[src]

An array containing all the Saturdays and Sundays