import { default } from "https://deno.land/x/date_fns@v2.22.1/eachMinuteOfInterval/index.ts";
Examples
// Each minute between 14 October 2020, 13:00 and 14 October 2020, 13:03
const result = eachMinuteOfInterval({
start: new Date(2014, 9, 14, 13),
end: new Date(2014, 9, 14, 13, 3)
})
//=> [
// Wed Oct 14 2014 13:00:00,
// Wed Oct 14 2014 13:01:00,
// Wed Oct 14 2014 13:02:00,
// Wed Oct 14 2014 13:03:00
// ]
// Each minute between 14 October 2020, 13:00 and 14 October 2020, 13:03 const result = eachMinuteOfInterval({ start: new Date(2014, 9, 14, 13), end: new Date(2014, 9, 14, 13, 3) }) //=> [ // Wed Oct 14 2014 13:00:00, // Wed Oct 14 2014 13:01:00, // Wed Oct 14 2014 13:02:00, // Wed Oct 14 2014 13:03:00 // ]
Parameters
optional
options: StepOptions