Moment.js - Get all mondays between a date range

Viewed 8096

I have a date range that looks like this

let start = moment(this.absence.FromDate);
let end = moment(this.absence.ToDate);

The user can decide to deactivate specific week days during that date range, so I have booleans

monday = true;
tuesday = false;
...

I want to create a function that allows me to put all mondays during my date range in an array.

I've looked around on stack but I can only find help for people who need all the monday from a month for example.

1 Answers
Related