Very Popular
Latest
function default
import { default } from "https://dotland.deno.dev/x/date_fns@v2.22.1/eachWeekendOfInterval/index.ts";

Examples

// 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 // ]

Parameters

interval: Interval

Returns

Date[]

an array containing all the Saturdays and Sundays