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

Parameters

dirtyInterval
  • the interval. See [Interval]docs/types/Interval
options