import { eachWeekOfInterval } from "https://deno.land/x/date_fns@v2.0.0-beta.2/index.js";
Examples
// Each week within interval 6 October 2014 - 23 November 2014:
var result = eachWeekOfInterval({
start: new Date(2014, 9, 6),
end: new Date(2014, 10, 23)
})
//=> [
// Sun Oct 05 2014 00:00:00,
// Sun Oct 12 2014 00:00:00,
// Sun Oct 19 2014 00:00:00,
// Sun Oct 26 2014 00:00:00,
// Sun Nov 02 2014 00:00:00,
// Sun Nov 09 2014 00:00:00,
// Sun Nov 16 2014 00:00:00,
// Sun Nov 23 2014 00:00:00
// ]
// Each week within interval 6 October 2014 - 23 November 2014: var result = eachWeekOfInterval({ start: new Date(2014, 9, 6), end: new Date(2014, 10, 23) }) //=> [ // Sun Oct 05 2014 00:00:00, // Sun Oct 12 2014 00:00:00, // Sun Oct 19 2014 00:00:00, // Sun Oct 26 2014 00:00:00, // Sun Nov 02 2014 00:00:00, // Sun Nov 09 2014 00:00:00, // Sun Nov 16 2014 00:00:00, // Sun Nov 23 2014 00:00:00 // ]