eachMonthOfInterval
import { eachMonthOfInterval } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";
@example
// Each month between 6 February 2014 and 10 August 2014:
const result = eachMonthOfInterval({
start: new Date(2014, 1, 6),
end: new Date(2014, 7, 10)
})
//=> [
// Sat Feb 01 2014 00:00:00,
// Sat Mar 01 2014 00:00:00,
// Tue Apr 01 2014 00:00:00,
// Thu May 01 2014 00:00:00,
// Sun Jun 01 2014 00:00:00,
// Tue Jul 01 2014 00:00:00,
// Fri Aug 01 2014 00:00:00
// ]
function eachMonthOfInterval<DateType extends Date>(interval: Interval<DateType>, options?: EachMonthOfIntervalOptions): DateType[];
§
eachMonthOfInterval<DateType extends Date>(interval: Interval<DateType>, options?: EachMonthOfIntervalOptions): DateType[]
[src]§Parameters
§
options?: EachMonthOfIntervalOptions optional
[src]