Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function default
import { default } from "https://deno.land/x/date_fns@v2.7.0/eachWeekendOfInterval/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 // ]

Parameters

interval
  • the given interval. See [Interval]docs/types/Interval