I am trying to get the nth
Friday of a month with momentjs
where n
is in the range [1,4]
So if a user supplies n as 2. Then I need to get the date for the second Friday of the month.
Here is what I tried with no sucess
let startingFrom = new Date("StartDateStringGoesHere");
let n=2;
let nthFriday = moment(startDate).isoWeekday(n); //I can't figure out how to resolve it here
Any ideas will be truly appreciated.