import { eachWeekendOfInterval } from "https://deno.land/x/date_fns@v2.0.0-alpha.35/index.js";
Examples
// Lists all Saturdays and Sundays in the given date interval
var 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
// ]
// Lists all Saturdays and Sundays in the given date interval var 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 // ]