import { eachWeekendOfYear } from "https://deno.land/x/date_fns@v2.0.0-beta.2/index.js";
Examples
// Lists all Saturdays and Sundays in the year
var result = eachWeekendOfYear(new Date(2020, 1, 1))
//=> [
// Sat Jan 03 2020 00:00:00,
// Sun Jan 04 2020 00:00:00,
// ...
// Sun Dec 27 2020 00:00:00
// ]
]
// Lists all Saturdays and Sundays in the year var result = eachWeekendOfYear(new Date(2020, 1, 1)) //=> [ // Sat Jan 03 2020 00:00:00, // Sun Jan 04 2020 00:00:00, // ... // Sun Dec 27 2020 00:00:00 // ] ]